in reply to Reading in the first 10 lines of a file
do { ($counter++ < 11) ? print : last } while (<F>)