If you don't mind destroying your array or can make a copy of it then you could use splice:
my @foo = (1 .. 154); + my @bar; + while ( my @sp = splice @foo, 0, 30 ) { push @bar, \@sp; } + foreach my $zub (@bar) { print "@{$zub}\n"; }
/J\
In reply to Re: dividing up arrays
by gellyfish
in thread dividing up arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |