Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: How to assign string "0" in short circuit

by naikonta (Curate)
on Feb 05, 2008 at 07:52 UTC ( #666235=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to assign string "0" in short circuit
in thread How to assign string "0" in short circuit

Short circuit operators always evaluate in boolean context. In boolean context there are only true and false. The string "0" and numberic 0 are, among others, false. But, 0 (or empty string) is defined. So you need to check for defined-ness to allow them. See True or False? A Quick Reference Guide.

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

  • Comment on Re^3: How to assign string "0" in short circuit

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://666235]
help
Chatterbox?
[marto]: Sharepoint ss a mess
[marto]: /ss/is/
[Discipulus]: yes I can imagine marto but they dont take my opinion in consideration..
[marto]: I told our client this, they spent many years and lots of consultants to try and get it to do what they wanted. They're ditching it now
[Discipulus]: I hope at least a minimal implementation, in the middle of july i'll have the first introductional course..
Discipulus nemo profeta in patria..

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2017-06-27 09:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (601 votes). Check out past polls.