my @lines = ; while () { if ($_ =~ /nine/) { print "found\n"; } else { print "not found\n"; } }