PFT::Util(3)

πŸ“¦ version 1.4.1, in fedora 43, fedora 44

✨ PFT::Util ✨

okay bestie, so this is PFT::Util from the User Contributed Perl Documentation section (section 3, the library pages, iykyk) 🫢 and it's genuinely just a lil grab-bag of helper stuff, but it's useful helper stuff so let's go πŸ’…


🌸 NAME 🌸

PFT::Util β€” Utilities ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so basically, this module is where all the general utility functions live. not like, a specific job, just the lil friends that help everything else out 🧚


πŸŽ€ files πŸŽ€

List all files under the given directories. that's it, that's the whole vibe. you hand it some dirs, it hands you back every file chilling underneath them πŸ’–

list_files 'foo' 'bar'

okay and now the tea β˜• β€” the docs are very upfront that this is definitely off-scope, but sometimes perl modules are just really bad, okay?? and File::Find is an utter crap! 😭 like, that's a direct quote, no cap. and the author does not want to add more external deps for such a stupid thing, which honestly? valid. main character energy πŸŽ€

oh also β€” this handles encoding according to locale πŸ‘‘ so the filenames come back all proper and unicode-correct, not a garbled mess.


🌈 locale_glob 🌈

a unicode-safe glob ✨ the way that it just… works with your weird filenames?? iconic.

it uses the encoding specified in locale πŸ¦‹

and the way it's different from CORE::glob is that it accepts a list of glob patterns πŸ‘‘ like, plural, multiple patterns, one call. CORE::glob could never fr fr πŸ’…


⚠️ friendly reminder bestie: File::Find catching strays in the official docs is canon now, we do not make the rules 🫢

and that's the whole page, babe ✨ this one shipped with perl v5.42.0 and got dated 2025-07-25 🌸 so like, go forth and list your files, stay unicode-safe, and remember: you're doing amazing sweetie πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from