Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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??

Help for this page

Select Code to Download


  1. or download this
    my $c = -5;
    print "C is now $c\n";
    
    $c = 0 if ($c < 0);
    print "C is now $c\n";
    

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 cooling their heels in the Monastery: (9)
As of 2016-08-24 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (347 votes). Check out past polls.