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

Re: Conditionally Changing a Variable

by joealba (Hermit)
on Dec 17, 2001 at 23:05 UTC ( #132616=note: print w/ replies, xml ) Need Help??


in reply to Conditionally Changing a Variable

Works fine for me, without the typo. Was that a cut-n-paste error, or is that your actual code (with the c$ instead of $c in your conditional)?

my $c = -5; print "C is now $c\n"; $c = 0 if ($c < 0); print "C is now $c\n";


Comment on Re: Conditionally Changing a Variable
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2014-12-18 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (48 votes), past polls