in reply to Regex Problems

This should be of help.

my $file = "apple.htm"; $file =~ s/^(.*)\.(.*)$/$1/; print "\$file = $file\n";

Explanation: The initial (.*) in s/^(.*)\.(.*)$/$1/; evaluates any string before the "." character and $1 representing this string char replaces the initial value assigned to the $file variable.

Anandatirtha