Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Boolean counter?

by vitoco (Hermit)
on Dec 07, 2009 at 12:47 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://811492]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found