Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Boolean counter?

by vitoco (Friar)
on Dec 07, 2009 at 12:47 UTC ( #811492=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      my %Next = ( 0 => 1, 1 => 0);
      my $Counter = 0;
      #...
      $Counter = $Next{$Counter};
    
  2. or download this
      $Counter = abs --$Counter;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://811492]
help
Chatterbox?
1nickt feels dirty ... just wrote and deployed first ever lines of PHP.
[shmem]: 1nickt--
[1nickt]: That's why I came to confess my sins ...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2017-10-16 22:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (217 votes). Check out past polls.

    Notices?