Since you want an exact match, you can call index instead, and not have to worry about regex metacharacters:
if ( index( $line, $cont) != -1) { print "We have a match\n"; } else { print "No match\n"; }
After Compline,
Zaxo
In reply to [TIMTOWTDI] Re: Find a string within a string
by Zaxo
in thread Find a string within a string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |