Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-01-18 19:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (163 votes). Check out past polls.