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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://47524]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-18 14:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found