good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Re: Re: Help with referencesby hanenkamp (Pilgrim) |
on Oct 23, 2003 at 04:05 UTC ( [id://301475]=note: print w/replies, xml ) | Need Help?? |
Preferred syntax? This is Perl, TMTOWTDI. That is, there is no preferred anything. There are, perhaps, caveats and some no-nos and some performance variations on occasion, but beyond this, do things the way you like. In this case, it's all syntactic sugar, so the interpreter ends up seeing the same thing whether there's a -> or not. Personally, I find that $HASH{$key}->[$index] has a higher noise-to-signal ratio than $HASH{$key}[$index], so I prefer the latter.
In Section
Seekers of Perl Wisdom
|
|