Help for this page
while (<FOO_FILE>){ if (/$foo/){ ... print $_; } }
while (<FOO_FILE>){ last if /$foo/; ... close FOO_FILE; # just ignore the rest of the file