![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Re^2: Parse out the extension of a filename - return base of filename.by freonpsandoz (Beadle) |
on Sep 20, 2016 at 22:26 UTC ( #1172253=note: print w/replies, xml ) | Need Help?? |
The key to this working is the regular expression passed to the fileparse method Too bad File::Basename doesn't set a reasonable default for the fileparse() RE based on the OS like it does for the path separator. If you understand REs well enough to supply a correct one to fileparse(), you most certainly don't need File::Basename to get the file extension!
In Section
Snippets Section
|
|