if ( $string =~ /search pattern here/ ) { print ( "found string" ); } else { print ( "didnt find string" ); };