- or download this
( EXPR )[$index]
( EXPR )[@indexes]
- or download this
use File::Spec qw( );
my $file = ( File::Spec->splitpath($path) )[2];
- or download this
use File::Basename qw( basename ); # Also core module
my $file = basename($path);
- or download this
use File::Path qw( file ); # Addresses issues with File::Spec
my $file = file($path)->basename();