Help for this page
use File::Basename; $pathandfile='C:\temp\foo foo\foo foo.txt'; ($filename, $path)=fileparse($pathandfile); print "$path = $filename";
fileparse - split a pathname into pieces filename - extract just the filename from a path path - extract just the directory from a path