Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Thoughts on replacing -> with .

by perl514 (Pilgrim)
on Jun 11, 2013 at 11:22 UTC ( #1038236=note: print w/replies, xml ) Need Help??


in reply to Thoughts on replacing -> with .

Hi,

 

I use Perl once in a while, and still think that -> should not be replaced. Leave it be if that's possible.

Perlpetually Indebted To PerlMonks

use Learning::Perl; use Beginning::Perl::Ovid; print "Awesome Books";
http://dwimperl.com/windows.html is a boon for Windows.

Replies are listed 'Best First'.
Re^2: Thoughts on replacing -> with .
by Anonymous Monk on Jun 11, 2013 at 14:25 UTC

    I find that many people do something like:

    $var->{key1}->{key2}->{key3}

    when the following should suffice:

    $var->{key1}{key2}{key3}

      Iím one of those people, and Iím not entirely sure why I do it. Iím fully aware that the later arrows are optional. The one arrow notation feels a bit asymmetric, and it doesnít show that they all are refs in there, I guess.

      I usually write ${${$$var{key1}}{key2}}{key3}, or, very rarely $$var{key1}{$key2}{$key3} or an intermediate variant. I never use arrow dereferencing.

        Those are particularly unusual ways of doing it. But hey, TIMTOWTDI.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1038236]
help
Chatterbox?
[Corion]: acapella hessian rap, but they also do melodic stuff, like Shout (Tears for Fears)
[karlgoethebier]: Rap rhymes to crap. Ouch!
[karlgoethebier]: Unne hip unne hop unne schoppe inne kopp...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (11)
As of 2017-11-18 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?