Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Why does the Perl conditional operator not do what I expect?

by linuxer (Curate)
on Apr 20, 2009 at 10:50 UTC ( #758665=note: print w/ replies, xml ) Need Help??


in reply to Why does the Perl conditional operator not do what I expect?

You should use it like it's shown in the perldoc perlop:

$a = $condition ? 2 : 3; print $a;


Comment on Re: Why does the Perl conditional operator not do what I expect?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2015-09-05 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred temperature scale is:










    Results (152 votes), past polls