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

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.

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2019-02-18 08:10 GMT
Find Nodes?
    Voting Booth?
    I use postfix dereferencing ...

    Results (100 votes). Check out past polls.