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

... if($theMatch =~ /\Q$line\E/ ) ...
The \Q and \E start and stop metacharacter escaping, respectively.

--Dave