http://www.perlmonks.org?node_id=729493


in reply to Regex To Remove File Extension

You have plenty of good examples to chose from. This might work for you also:
my $string = 'foo.bar.txt'; $string =~ s/\.\w{3}$//;
Jamie