Catman...ce_all(3pm)
β¨ Catmandu::Fix::replace_all β¨
okay bestie, welcome to the Catmandu::Fix::replace_all page from your very own User Contributed Perl Documentation (section 3pm, iykyk) π
π NAME π
Catmandu::Fix::replace_all β search and replace using regex expressions πΈ
like, it does a find-and-replace, but make it regex. no cap.
β¨ SYNOPSIS β¨
here's the whole vibe, bestie β we're pulling a lil substring out of a field's value π¦:
# Extract a substring out of the value of a field
# {author => "tom jones"}
replace_all(author, '([^ ]+) ([^ ]+)', '$2, $1')
# {author => "jones, tom"}
the way that {author => "tom jones"} just became {author => "jones, tom"}?? iconic. it literally swapped the two capture groups and slid a comma in between. ate. π₯
π SEE ALSO π
Catmandu::Fixβ go say hi to the parent, she's the main character π
lowkey important: the regex'([^ ]+) ([^ ]+)'and the replacement'$2, $1'are exactly what they are β don't be out here renaming them, bestie π«Ά
and that's the whole page fr fr π this one's from perl v5.40.1, dated 2026-01-24 β stay slay, go fix some fields, mwah πβ¨π¦
π¦ 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