Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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;

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 pondering the Monastery: (8)
As of 2016-09-29 10:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (551 votes). Check out past polls.