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...).
In reply to Re: Parse out the extension of a filename - return base of filename.
by ariels
in thread Parse out the extension of a filename - return base of filename.
by snafu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |