in reply to Iterating through referenced arrays wihthin a hash

Use CPAN. Specifically, the natatime() function in List::MoreUtils.
my @arr = ( [ 0 .. 3 ], [ 4 .. 5 ], [ 6 .. 9 ], ); my @all = map { @$_ } @arr; my $iterator = natatime @all, 2; @arr = (); while ( my @v = $iterator->() ) { push @arr, \@v; }

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?