in reply to Regex ERROR!

You'll need to escape the meta-characters in $comm e.g
## note the \Q before $comm if(($line eq $comm) || ($line =~ /\Q$comm/)){ print"Line $i: $comm"; }
And it looks like a simple index would be better suited in this situation since you're just testing to see whether $comm is in $line e.g
if(($line eq $comm) || (index($line, $comm) > -1)){ print"Line $i: $comm"; }
See. perlre and quotemeta for more info on escaping regex meta-characters and perldiag for a more detailed explanation of your error.
HTH

_________
broquaint