Help for this page

Select Code to Download


  1. or download this
    $path = "\path1\path2\path3\file.ext";
    $path =~ s/(.*)\\(.*)/$2/gi;
    print "$path";
    
  2. or download this
    use File::Spec;
    $path = "\path1\path2\path3\file.ext";
    ($volume,$directories,$file) = File::Spec->splitpath($path);
    print "$file";
    
  3. or download this
    $path = "`path1`path2`path3`file.ext";
    $path =~ s/(.*)`(.*)/$2/gi;
    print "$path";