in reply to Perl script to Parse a file for a string

excuse me for butting in here, or dont :P
But wouldnt a simple for not present:
if ( $string !~ /search patter here/ ) { print ( "didnt find match" ); };


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

please keep in mind i am new at perl but i think this would work for finding or not finding patterns in strings :)
Edit: seems i just reposted some code from above lol.