do { ($counter++ < 11) ? print : last } while (<F>)
be sure to close F. In reply to Re: Reading in the first 10 lines of a file
by dlc
in thread Reading in the first 10 lines of a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |