in reply to Regex ERROR!
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## note the \Q before $comm if(($line eq $comm) || ($line =~ /\Q$comm/)){ 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.if(($line eq $comm) || (index($line, $comm) > -1)){ print"Line $i: $comm"; }
_________
broquaint
|
|---|