Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: strange behaviour in perl ..please explain

by poolpi (Hermit)
on Jan 23, 2009 at 10:13 UTC ( [id://738421]=note: print w/replies, xml ) Need Help??


in reply to strange behaviour in perl ..please explain

Try it with these pragmas :

use strict; use warnings;

Update:
You may have a look at the ternary operator in perlop

my $var = 1; print ($var ? 'yes' : 'no');


hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-24 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found