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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: The Cost of Nested Referencing
by Aristotle (Chancellor) on Nov 20, 2002 at 13:54 UTC | |
by lestrrat (Deacon) on Nov 20, 2002 at 18:24 UTC | |
by Aristotle (Chancellor) on Nov 20, 2002 at 18:34 UTC | |
by lestrrat (Deacon) on Nov 20, 2002 at 18:39 UTC | |
by Aristotle (Chancellor) on Nov 20, 2002 at 18:43 UTC | |
| |
Re: The Cost of Nested Referencing
by Abigail-II (Bishop) on Nov 19, 2002 at 10:11 UTC |
In Section
Meditations