in reply to Regex Problems

Try this:
my $f = "apple.htm"; $f =~ s/^(\w+)\.(\w+)$/$1./; print "\$f = $f\n";