while (<>) { $. > 10 ? last : print; } [download]
In reply to Re: Reading in the first 10 lines of a file by trizen in thread Reading in the first 10 lines of a file by Anonymous Monk