Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 exploiting the Monastery: (8)
As of 2016-02-08 11:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (275 votes), past polls