Help for this page

Select Code to Download


  1. or download this
    $fullname = "C:\\apple\\index.htm";
    my ($file) = $fullname =~ m!([^/\\]+)$!;
    print $file;
    
  2. or download this
    use File::Basename; # I ain't afraid of no ghosts..
    $fullname = "C:\\apple\\index.htm";
    my $file = basename $fullname;
    print $file;