FILE::SPEC::FUNCTIONS(3perl)

✨ NAME ✨

File::Spec::Functions β€” bestie, it does operations on file names, but portably πŸ’… like it works everywhere and doesn't care what OS you're on.


🌸 SYNOPSIS 🌸

use File::Spec::Functions;
my $x = catfile('a', 'b');

okay so literally two lines and you're already slaying πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea, bestie: this module exports convenience functions for all of the class methods that File::Spec gives you. It's giving "I don't wanna type File::Spec-> a million times" energy and honestly? Same. πŸ™ˆ

Wanna see the full reference of available functions? Go consult File::Spec::Unix β€” that one has the entire set of them, and it's the one that gets inherited by the modules for the other platforms. So like, it's the blueprint, the blueprint's blueprint. ✨

And for even more info, go peek at File::Spec::Mac, File::Spec::OS2, File::Spec::Win32, or File::Spec::VMS. iykyk 🫢

πŸ’– Exports

These ones below? Exported by default. Like, you get them automatically, no questions asked, they just show up for you like a good friend. 🀝

canonpath
catdir
catfile
curdir
rootdir
updir
no_upwards
file_name_is_absolute
path

And these next ones? You gotta ask for them. Exported only by request. Not clingy, they wait for an invitation. πŸ’Œ

devnull
tmpdir
splitpath
splitdir
catpath
abs2rel
rel2abs
case_tolerant

Oh and btw β€” literally all of them (yes, all) can be imported using the ":ALL" tag. One tag, everything, no cap. πŸ‘‘


Copyright (c) 2004 by the Perl 5 Porters. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. so like, go wild legally speaking πŸŽ€


🌈 SEE ALSO 🌈

  • File::Spec
  • File::Spec::Unix
  • File::Spec::Mac
  • File::Spec::OS2
  • File::Spec::Win32
  • File::Spec::VMS
  • ExtUtils::MakeMaker

and that's the whole vibe bestie, you're officially a file path icon πŸ’…β­

perl v5.44.0, dated 2026-10-17 β€” yeah I know, iconic timing, it ate. 🫢✨

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND 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