Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Not understanding the arrow operator

by kennethk (Abbot)
on May 18, 2009 at 20:02 UTC ( #764717=note: print w/replies, xml ) Need Help??


in reply to Not understanding the arrow operator

Oh, but something is being dereferenced. An array of hashes is actually an array of hash references, and so each element fed into your map is a scalar hash reference. You are probably confused because you can say $pages[0]{id}, which contains an implicit arrow operator (i.e. is equivalent to $pages[0]->{id}). See Using References for some details.

Replies are listed 'Best First'.
Re^2: Not understanding the arrow operator
by bradcathey (Prior) on May 18, 2009 at 20:23 UTC

    Thanks kenneth and DStaal. I didn't realize that an AOH was really an array of hash refs with the implicit arrow. Interesting.

    —Brad
    "The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2018-09-22 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (190 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!