Catman...:paste(3pm)
π paste(3pm) β Catmandu::Fix::paste π
okay bestie, pull up a chair, because this one is the glow-up your data records have been waiting for π«Ά this is Catmandu::Fix::paste, straight out of the User Contributed Perl Documentation crowd, and it's here to mush a bunch of paths together into one gorgeous little string. no cap.
β¨ NAME β¨
Catmandu::Fix::paste β concatenate path values π
π SYNOPSIS π
here's the vibe, okay? imagine your data record is serving absolute cutesy:
# If you data record is:
# a: eeny
# b: meeny
# c: miny
# d: moe
paste(my.string,a,b,c,d) # my.string: eeny meeny miny moe
want a lil separator between them so it doesn't look like one long word salad? there's a join_char for that, bestie:
# Use a join character
paste(my.string,a,b,c,d,join_char:", ") # my.string: eeny, meeny, miny, moe
and you can yeet literal strings straight in there too, just slap a tilde (~) in front of them. it's giving mix-and-match β¨
# Paste literal strings with a tilde sign
paste(my.string,~Hi,a,~how are you?) # my.string: Hi eeny how are you?
and here's the part that ate, honestly β paste does NOT panic if some of your paths never showed up. it just rolls with it π
# Paste works even when not all values are instantiated
paste(my.string,x,a,z) # my.string: eeny
πΈ DESCRIPTION πΈ
okay so the tea: Paste takes every path starting from the second path and glues their values together into the first path. first path = the destination, everything after = the little guys getting smushed in. periodt.
and listen β you're not limited to paths. if you wanna paste an actual literal value, just prefix it with a tilde (~) sign and it'll get treated as text instead of a path. iconic behaviour fr fr π
and if a path straight up doesn't exist? no drama, no crisis. it's regarded as having an empty '' value, so it just quietly contributes nothing to the final string. lowkey respectful of your feelings.
π¦ SEE ALSO π¦
- Catmandu::Fix β go say hi to the parent, iykyk π
okay that's the whole page, you're so welcome π this was Catman...:paste(3pm), brought to you by perl v5.40.1 on 2026-01-24, and yes, it's still hanging out in the User Contributed Perl Documentation section like the main character it is. go paste something cute bestie, 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