Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

(tye)Re2: References quick reference

by tye (Cardinal)
on Apr 05, 2001 at 21:44 UTC ( #70181=note: print w/ replies, xml ) Need Help??


in reply to Re: References quick reference
in thread References quick reference

I definitely avoid $$hRef{key} and $$aRef[0] (using $hRef->{key} instead). But I don't really like @{...} much (too hard to match up the open and close braces) so I prefer @$aRef and %$hRef to the versions with {}. For @{$aRefs{key}} I have no choice.

But when (and if) a version of Perl comes out with "the patch" applied, I'll be switching to nearly exclusively using -> to deference. This patch allows $aRef->@, $hRef->%, $aRef->@[1..5], etc. which are particularly nice for cases like $aRefs->{key}->[0]->getList()->@[2..6].

        - tye (but my friends call me "Tye")


Comment on (tye)Re2: References quick reference
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (17)
As of 2015-07-28 14:47 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 (256 votes), past polls