in reply to Print multiple hashes of arrays at same time

This may be slightly more readable. Since it accesses elements of both arrays in the same way (using an index), it is a bit more consistent. It also eliminates the explicit $i++;. You can decide if it is better.
print "BEST SELECTED BEST\n"; foreach my $value (sort keys %{$best}) { foreach my $i (0 .. $#{$best->{$value}}) { printf "%10.5f ", $best ->{$value}[$i]; printf "%10.5f" , $kept_best->{$value}[$i] if defined $kept_best->{$value}[$i]; print "\n"; } }

Replies are listed 'Best First'.
Re^2: Print multiple hashes of arrays at same time
by tomdbs98 (Beadle) on Jul 19, 2010 at 19:11 UTC
    Yes, the explicit  $i++ was what was really bugging me.