Catman...x::uniq(3pm)
β¨ NAME β¨
okay bestie, welcome to Catmandu::Fix::uniq π β it's a Catmandu::Fix page from the User Contributed Perl Documentation, section 3pm, and it does exactly one thing and does it flawlessly:
Catmandu::Fix::uniqβ strip duplicate values from an array π§Ήβ¨
likeβ¦ that's it. that's the whole job. it takes your array, it looks at all the lil values, and it goes "not today, twin" to every repeat. iconic behaviour honestly π
πΈ SYNOPSIS πΈ
here's the whole vibe in one little block, no cap π¦
# {tags => ["foo", "bar", "bar", "foo"]}
uniq(tags)
# {tags => ["foo", "bar"]}
so you walk in with tags being ["foo", "bar", "bar", "foo"] β kinda messy, kinda giving "i said it twice bc i meant it" π β and you walk out with ["foo", "bar"]. the duplicates got un-alived (affectionately), the survivors kept their order, and the array is now clean. slay. π
lowkey the way this works is you call uniq(tags) on the field name and it rewrites that same field in place, so your fix file stays cute and tidy. periodt.
π SEE ALSO π
go touch grass in these other pages when you're done here, bestie π
Catmandu::Fixβ the whole Fix framework this lil cutie lives inside π«Ά
and that's the tea ββ¨ this page ships as part of perl v5.40.1, dated 2026-01-24, and it belongs to the Catmandu::Fix::uniq manual (section 3pm) β mwah, go dedupe something gorgeous πππ¦
π¦ 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