Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2016-07-28 22:21 GMT
Find Nodes?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?

    Results (258 votes). Check out past polls.