Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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?
[Discipulus]: practical use for?
[marto]: finding bugs, either in the CPU layer or hypervisor, finding undocumented instructions
[zentara]: are you talikng about perf?
[Discipulus]: i miss what an undocumented instructions can be, and how can be used
[zentara]: perf

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2017-07-28 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (428 votes). Check out past polls.