Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Boolean counter?

by ikegami (Pope)
on Dec 07, 2009 at 08:08 UTC ( #811444=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ($toggle) {
        $toggle = 0;
    } else {
        $toggle = 1;
    }
    
  2. or download this
    $toggle = $toggle ? 0 : 1;
    
  3. or download this
    $toggle ^= 1;
    
  4. or download this
    $toggle = !$toggle;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://811444]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-04-20 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (487 votes), past polls