while () { print; print "FOUND IT!\n" if /foo/; }