Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^2: Hash dereferencing in a loop

by sundialsvc4 (Abbot)
on Jun 08, 2013 at 14:21 UTC ( #1037856=note: print w/ replies, xml ) Need Help??

in reply to Re: Hash dereferencing in a loop
in thread Hash dereferencing in a loop

Also, you may encounter “double-$” syntax:   $$hashref{$key}.

The two are equivalent, and notice in this case that the -> symbol does not appear.   Recommend that you consistently use one or the other (your choice) in your programs.   (Double-$ is less common.)

Also note that, in cases where a sequence of -> symbols would technically be required, to reference elements of a hashref that contains hashrefs, Perl allows the additional ones to be omitted.

Comment on Re^2: Hash dereferencing in a loop

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1037856]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2015-10-14 02:21 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (320 votes), past polls