in reply to How do I extract a file name from a path string
open FILES, "dir /b /aa /s |" or die; while ( <FILES> ) { my( $dir, $file ) = /(.+)\\(.+)/; defined $file or next; # no path separator print "$dir => $file\n"; } close FILES;
In Section
Seekers of Perl Wisdom