if ( index( $line, $cont) != -1) { print "We have a match\n"; } else { print "No match\n"; }