P is for Practical | |
PerlMonks |
Re: Re: splitting on win32 linefeeds aka pass the crackpipe!by chipmunk (Parson) |
on Feb 14, 2002 at 04:05 UTC ( [id://145372]=note: print w/replies, xml ) | Need Help?? |
The original substitution doesn't actually remove a trailing slash; rather, it removes the directory path leaving just the name of the file. If $filename is '/usr/local/bin/perl', $file will be 'perl'.
This is better done with File::Basename.
In Section
Seekers of Perl Wisdom
|
|