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

Re: another variation (variable set to 0 ? 0 : 1)

by sauoq (Abbot)
on Sep 07, 2002 at 04:51 UTC ( [id://195836]=note: print w/replies, xml ) Need Help??


in reply to another variation (variable set to 0 ? 0 : 1)
in thread variable set to 0 ? 0 : 1

return $status && 1;  # canonize false, leave true as-is

That would be great except it doesn't canonize false. It returns $status if $status is false. So, for example, if $status is "" it will return "", not 0.

-sauoq
"My two cents aren't worth a dime.";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-20 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found