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