Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 studying the Monastery: (3)
As of 2015-07-04 05:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls