Catman...ompact(3pm)
β¨ Catmandu::Fix::compact π
okay bestie, gather round, because this one is a tiny little Fix and it's lowkey iconic for it. it lives in the Catmandu::Fix family (perl, 3pm manual section, so you know it's module territory π) and its whole personality is: remove undefined values from an array. that's it. that's the job. and it ate. π«Ά
πΈ NAME πΈ
Catmandu::Fix::compact β remove undefined values from an array β¨
π SYNOPSIS π
watch the glow-up happen in real time, no cap:
# list => [undef,"hello",undef,"world"]
compact(list)
# list => ["Hello","world"]
so you hand it a list that's all sad and undef-riddled π and it hands you back a list with only the real ones still standing. main character energy fr fr. π
π¦ SEE ALSO π¦
Catmandu::Fixβ the whole squad, go say hi π
that's literally the whole page, bestie, short and slay. this gorgeous little thing is from the User Contributed Perl Documentation, perl v5.40.1, dated 2026-01-24 π kisses, go compact something πβ¨
π¦ where this page comes from
- ubuntu resolute: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms