>> (Original two choices)
>> : Is it better to :
> > : 
> > : %Fields = %{$Accts{$account}};
> > : foreach $name ( keys %Fields ) {
> > :   print "$name : $Fields{$name}\n";
> > : }
> > : 
> > : or 
> > : 
> > : foreach $name ( keys %{$Accts{$account}} ) {
> > :   print "$name : <ok I'm stuck again>\n";
> > : }

> I would actually prefere the first way, since each level of indirection 
> in the second call adds an overhead on performance, nothing major, but 
> in a simple case like this, i dont' see any reason why it shouldn't be 
> eliminated.

My impression was that the keys function returned a list, so that
the second option would loop through said list assigning $name to
each key.  

Wouldn't that make the second option "better" using your criteria
of less indirection? Instead of doing any indirection inside the loop
it's handled in the key list generation.

Am I totally hosed on how I thought this worked?

Dave

Reply via email to