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

Re: Meaning of //

by rsFalse (Hermit)
on Oct 20, 2019 at 11:33 UTC ( #11107719=note: print w/replies, xml ) Need Help??


in reply to Meaning of //

I use '//' sometimes to avoid warnings, e.g.:
perl -wle 'my $number; print 1 if 0 + ( $number // 0 )'
..e.g. in bigger expressions.
Otherwise I get: "Use of uninitialized value $number in addition (+) at -e line 1."

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2020-01-18 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?