Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Thoughts on using and, or, and not over && || !?

by choroba (Cardinal)
on Jul 11, 2016 at 22:20 UTC ( [id://1167583]=note: print w/replies, xml ) Need Help??


in reply to Thoughts on using and, or, and not over && || !?

Just make sure you don't
return $result or $default

Fortunately, more recent perls would warn you:

Possible precedence issue with control flow operator at ...

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Thoughts on using and, or, and not over && || !?
by Argel (Prior) on Jul 11, 2016 at 22:28 UTC
    I'm using Perl 5.16.3, so I might get the warnings. Good example of where it could be a problem. Thanks!

    Elda Taluta; Sarks Sark; Ark Arks
    My deviantART gallery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-20 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found