http://qs321.pair.com?node_id=213240


in reply to Re: The Cost of Nested Referencing
in thread The Cost of Nested Referencing

on linear code like that it may make things hader to read, but I don't see what's wrong with

my %hash = ( ..... ); foreach my $key1 (@keyset1) { my $inner = $hash{$key1}; foreach my $key2 (@keyset2) { print $inner->{$key2}; } }

instead of

my %hash = ( ..... ); foreach my $key1 (@keyset1) { foreach my $key2 (@keyset2) { print $hash{$key1}{$key2}; } }

That doesn't sacrifice too much in readability, I think