in reply to Extracting file name from path
You could make it a little more portable by allowing / as well with:
my $str = 'c:\dir\subdir/filename.ext'; my $filename = ( split /\\|\//, $str )[-1];
but then of course you have a regex in there, oh well.
tachyon
|
|---|