Catman...ompact(3pm)

πŸ“¦
version 1.2025 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

✨ 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