File::Spec(3) Perl Programmers Reference Guide File::Spec(3)NAMEFile::Spec - portably perform operations on file names
SYNOPSIS
use File::Spec;
$x=File::Spec->catfile('a', 'b', 'c');
which returns 'a/b/c' under Unix. Or:
use File::Spec::Functions;
$x = catfile('a', 'b', 'c');
DESCRIPTION
This module is designed to support operations commonly
performed on file specifications (usually called "file
names", but not to be confused with the contents of a
file, or Perl's file handles), such as concatenating sev
eral directory and file names into a single path, or
determining whether a path is rooted. It is based on code
directly taken from MakeMaker 5.17, code written by
Andreas Koenig, Andy Dougherty, Charles Bailey, Ilya
Zakharevich, Paul Schinder, and others.
Since these functions are different for most operating
systems, each set of OS specific routines is available in
a separate module, including:
File::Spec::Unix
File::Spec::Mac
File::Spec::OS2
File::Spec::Win32
File::Spec::VMS
The module appropriate for the current OS is automatically
loaded by File::Spec. Since some modules (like VMS) make
use of facilities available only under that OS, it may not
be possible to load all modules under all operating sys
tems.
Since File::Spec is object oriented, subroutines should
not called directly, as in:
File::Spec::catfile('a','b');
but rather as class methods:
File::Spec->catfile('a','b');
For simple uses, the File::Spec::Functions manpage pro
vides convenient functional forms of these methods.
For a list of available methods, please consult the
File::Spec::Unix manpage, which contains the entire set,
and which is inherited by the modules for other platforms.
For further information, please see the File::Spec::Mac
manpage, the File::Spec::OS2 manpage, the
File::Spec::Win32 manpage, or the File::Spec::VMS manpage.
SEE ALSO
File::Spec::Unix, File::Spec::Mac, File::Spec::OS2,
File::Spec::Win32, File::Spec::VMS, File::Spec::Functions,
ExtUtils::MakeMaker
AUTHORS
Kenneth Albanowski <kjahds@kjahds.com>, Andy Dougherty
<doughera@lafcol.lafayette.edu>, Andreas Koenig
<A.Koenig@franz.ww.TU-Berlin.DE>, Tim Bunce
<Tim.Bunce@ig.co.uk>. VMS support by Charles Bailey <bai_
ley@newman.upenn.edu>. OS/2 support by Ilya Zakharevich
<ilya@math.ohio-state.edu>. Mac support by Paul Schinder
<schinder@pobox.com>. abs2rel() and rel2abs() written by
Shigio Yamaguchi <shigio@tamacom.com>, modified by Barrie
Slaymaker <barries@slaysys.com>. splitpath(), splitdir(),
catpath() and catdir() by Barrie Slaymaker.
2001-03-03 perl v5.6.1 File::Spec(3)