Catman...:paste(3pm)

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

πŸ’– 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