Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Boolean counter?

by eyepopslikeamosquito (Chancellor)
on Dec 07, 2009 at 19:36 UTC ( #811609=note: print w/replies, xml ) Need Help??


in reply to Re: Boolean counter?
in thread Boolean counter?

Just to make "lookup-tables" prettier. ;-)

$counter = [ 1 => 0 ] -> [ 1 <= $counter ];

Replies are listed 'Best First'.
Re^3: Boolean counter?
by ikegami (Pope) on Dec 08, 2009 at 00:06 UTC
    ug, you create two variables every time you toggle it (one of which is an array!), and you rely on the undocumented values of <= returns. And the latter doesn't help make it prettier at all!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://811609]
help
Chatterbox?
NodeReaper preheats the oven before tossing in a TV dinner

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2016-12-09 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (148 votes). Check out past polls.