Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Power of two round up.

by jynx (Priest)
on Dec 20, 2000 at 06:12 UTC ( #47524=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    sub shifty {
    ...
       map { return ++$v } map { $v |= $v >> $_ } (1,2,4,8,16);
    }
    
  2. or download this
    
    sub shifty2 {
    ...
       return ++$v;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2014-07-28 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (185 votes), past polls