If I misunderstood and you are trying to get blocks of 16 lines,
my @buf; while (<>) { push @buf, $_; if (@buf == 16) { do_it(\@buf); @buf = (); } } if (@buf) { do_it(\@buf); }
In reply to Re: 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: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |