in reply to treating * as a normal character in a regex

You should use \Q and \E, which put backslashes before special characters. The regex should look something like this:
$theMatch =~ /\Q$line\E/
Also, are you trying to perform a substitution on $theMatch or $line? You're actually performing a substitution on $_ (which is probably not what you want).

-- Mike

--
just,my${.02}