Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Useless use of string in return statement

by syphilis (Archbishop)
on Apr 13, 2021 at 09:40 UTC ( [id://11131173]=note: print w/replies, xml ) Need Help??


in reply to Re: Useless use of string in return statement
in thread Useless use of string in return statement

I can never remember the rules of precedence, so I just remove the relevance of such considerations by using brackets to make my intentions clear:
C:\>perl -MO=Deparse,-p -e "return $x or $y" ((return $x) or $y); -e syntax OK C:\>perl -MO=Deparse,-p -e "return ($x or $y)" (return ($x || $y)); -e syntax OK
Cheers,
Rob

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found