in reply to problem in substitution
Portably perform operations on file names This core module may help you : File::Spec
#for example my ($volume,$directories,$file) = File::Spec->splitpath( $path, $no_file ); [download]
hth,PooLpi