Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: if statement confusion

by toolic (Chancellor)
on Jun 11, 2012 at 14:15 UTC ( #975575=note: print w/ replies, xml ) Need Help??


in reply to if statement confusion

B::Deparse (Tip # 6 from Basic debugging checklist)

perl -MO=Deparse -e '6 < 8 ? $ans = "true" : $ans = "false";' ($ans = 'true') = 'false';

Try:

$ans = 6 < 8 ? "true" : "false";
Conditional Operator


Comment on Re: if statement confusion
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2014-11-26 21:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (174 votes), past polls