Help for this page

Select Code to Download


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