in reply to The space between file names and folder names
Hi Prad,
Use File::Basename module to get the path andf file name.
use File::Basename; $pathandfile='C:\temp\foo foo\foo foo.txt'; ($filename, $path)=fileparse($pathandfile); print "$path = $filename";
Illustration the above code:
fileparse - split a pathname into pieces filename - extract just the filename from a path path - extract just the directory from a path
|
|---|