in reply to Reading in the first 10 lines of a file

while (<>) { $. > 10 ? last : print; }