Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 browsing the Monastery: (6)
As of 2015-04-21 05:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who makes your decisions?







    Results (389 votes), past polls