in reply to How can I split a hash into other N hashes

Your copying code is fine; you messed up your diagnostic code. Specifically
my $destKeyCount = keys %{$worker->{$numOfHashes}->{WORK}};
should be
my $destKeyCount = keys %{$worker->{$destKey}->{WORK}};
You're outputting case 1 twice. I see you included Data::Dumper; might have been helpful if you'd cross-checked with its output.

On a side note, line 78 is redundant with line 81 (but not vice versa).


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Replies are listed 'Best First'.
Re^2: How can I split a hash into other N hashes
by ataX (Initiate) on May 13, 2014 at 16:51 UTC
    Humm, I didn't see that error.. I might need to use Data::Dumper more.. that code was written at 6PM after a full days of perl debugging and writing. Thanks!