Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Mini-Tutorial: Dereferencing Syntax

by Anonymous Monk
on Jun 21, 2012 at 13:06 UTC ( #977633=note: print w/replies, xml ) Need Help??


in reply to Mini-Tutorial: Dereferencing Syntax

Not mentioned:   $$foo as shorthand for $foo->.
  • Comment on Re: Mini-Tutorial: Dereferencing Syntax

Replies are listed 'Best First'.
Re^2: Mini-Tutorial: Dereferencing Syntax
by ikegami (Pope) on Sep 17, 2012 at 05:03 UTC

    $$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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://977633]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2017-07-23 01:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (342 votes). Check out past polls.