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