use List::MoreUtils qw( natatime ); my $iter = natatime $l, @a; while (my @row = $iter->()) { push @b, \@row; }
Update: Switched to using a while loop, since the while statement modifier doesn't work here.
In reply to Re^2: Syntactically cool list of lists
by ikegami
in thread Syntactically cool list of lists
by jettero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |