in reply to Re: How can I split a hash into other N hashesin thread How can I split a hash into other N hashes
Array version, reprise:
my $keys = keys %{$hashref}; my @AoH; print "Original Hash Keys: $keys\n"; my $i=0; foreach my $key ( keys %{$hashref} ) { $AoH[$i++]{$key} = $hashref->{$key}; $i %= $numOfHashes; } print Dumper(@AoH); [download]