in reply to Parse out the extension of a filename - return base of filename.
Why not regexp it?
$file =~ s/\.[^.]*$//;
(That said, you probably should use File::Basename: it's more likely to DTRT on platforms with different conventions for extensions...).
|
|---|