My code reads from ARGV, not STDIN, so his comment does apply. Mind you, the OP said "file" singular, so resetting shouldn't be necessary.
See eof to reset the counter between files when using ARGV.
In reply to Re^4: How to read every 16 line of file ?
by ikegami
in thread How to read every 16 line of file ?
by bh_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |