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

Re^2: Mini-Tutorial: Dereferencing Syntax

by ikegami (Pope)
on Sep 17, 2012 at 05:03 UTC ( #993959=note: print w/ replies, xml ) Need Help??


in reply to Re: Mini-Tutorial: Dereferencing Syntax
in thread Mini-Tutorial: Dereferencing Syntax

$$foo is not a shorthand for $foo->.

>perl -E"$foo=\'foo'; say $$foo;" foo >perl -E"$foo=\'foo'; say $foo->;" syntax error at -e line 1, near "->;" Execution of -e aborted due to compilation errors.

You're probably thinking of the equivalency of $$foo[...] and $foo->[...] and of $$foo{...} and $foo->{...}, but that's already mentioned.


Comment on Re^2: Mini-Tutorial: Dereferencing Syntax
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2015-07-29 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (268 votes), past polls