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