in reply to Inelegant code to compare file names
Hi John,
Would splitpath from File::Spec work to get the file name in your case ? I don't know how it works on windows but I found it's usually easier & gets things right :)
my ($volume,$directories,$file) = File::Spec->splitpath( $path );
|
|---|