in reply to Reaped: Re: Regex To Remove File Extension
in thread Regex To Remove File Extension

What about doing this:

$filename =~ /(.*)\./; my $basename = $1;

Since the regex above is greedy, it should capture everything up to the last period. It seems to work for me. Am I missing something?