Perhaps marginally nicer, the kite operator:
while(( my @lines = map ~~<>, 1 .. 4 )[0]) { print @lines; print "\n"; }
In reply to Re^2: Reading files n lines a time
by tobyink
in thread Reading files n lines a time
by naturalsciences
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |