Catman...:filter(3pm)

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

πŸ’– filter(3pm) β€” the Catmandu::Fix glow-up page πŸŽ€

okay bestie, so this is the manpage for filter, living over in the Catmandu::Fix family of Perl modules, and it's literally one of the most useful little fixes in the whole group chat. User Contributed Perl Documentation, if you were wondering where it came from. πŸ¦‹


✨ NAME ✨

Catmandu::Fix::filter β€” Filter values out of an array based on a regular expression 🌸

Like. It takes your array, looks at every single value in it, and keeps only the ones matching your pattern. Vibe check for array elements, no cap. πŸ’…


🌈 SYNOPSIS 🌈

Here's the tea, bestie. Say your words array is giving

# words => ["Patrick","Nicolas","Paul","Frank"]

and you run this:

filter(words,'Pa')

boom, now it's:

# words => ["Patrick","Paul"]

only the Pa girlies survived. 🫢

Now, plot twist β€” you can also flip it and keep only the values that do NOT match the pattern:

# filter only values that do NOT match the pattern:
filter(words, 'Pa', invert: 1)
# words => ["Nicolas","Frank"]

invert: 1 is giving main character energy fr fr. πŸ’€βœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

  • Catmandu::Fix β€” the whole squad this one belongs to πŸ’œ

and that's the whole page, bestie!! 🌟 this was perl v5.40.1, dated 2026-01-24, straight from the Catman...:filter(3pm) corner of the internet. go filter something iconic. mwah. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from