Help for this page

Select Code to Download


  1. or download this
    my $file_name = ( split m{/}, $0 )[-1];
    
  2. or download this
    my $file_name = substr $0, 1 + rindex $file, '/';
    
  3. or download this
    my ( $file_name ) = $0 =~ m{([^/]+)$};
    
  4. or download this
    use File::Basename qw(basename);
    
    my $file_name = basename $0;