File::Basename

Parses a file’s path, returning its three component pieces: the path to the file, the file’s basename, and the file’s extension. For example, for:

/usr/local/lib/perl5/SelectSaver.pm

the path is /usr/local/lib/perl5, the basename is SelectSaver, and the extension is .pm. File::Basename exports the following functions.

Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.