more useful options | |
PerlMonks |
Re: What operator should perl5porters use for safe dereferencing?by tobyink (Canon) |
on May 29, 2012 at 18:41 UTC ( [id://973090]=note: print w/replies, xml ) | Need Help?? |
I think the question-mark ones probably seem like they'd be most intuitive. We're already familiar with "?" from the ternary operator; and if you use one of the many CPAN modules providing method signatures, the question mark is often used to indicate optional parameters. That said, the ~> looks less ugly in real code, so overall I prefer that.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Past Polls
|
|