Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
There's more than one way to do things
 
PerlMonks  

Re: The Drivel is in the Details

by blazar (Canon)
on May 29, 2007 at 23:01 UTC ( #618081=note: print w/ replies, xml ) Need Help??


in reply to The Drivel is in the Details

Why is the -> necessary in $source->{$node}

Because $source is a (hash) reference and it needs to be dereferenced.

and why the %$ and @$ symbols instead of just % and @?

Because the symbols are still simply % and @, but now you're using them to dereference something that is held in a scalar, which is prefixed by the $ sigil: this is another method for dereferencing, and in its full blown form it should be:

%{ $hashref }

But in this simple case the curlies can be omitted. In more complex contructs, they cannot.


Comment on Re: The Drivel is in the Details
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-04-17 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (458 votes), past polls