sub next_power_of_two { my %s; @s{1..shift} = (); local $_ = %s; return m{/(.*)}; }
(I've changed the original code a bit to pass "use warnings"), -- so the annual Perl Code Joke prize goes to shmem!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: next power of two
by jmcnamara (Monsignor) on Nov 26, 2007 at 14:47 UTC | |
by shmem (Chancellor) on Nov 26, 2007 at 18:04 UTC | |
|
Re: next power of two
by ikegami (Patriarch) on Nov 26, 2007 at 15:50 UTC | |
|
Re: next power of two
by Anonymous Monk on Nov 26, 2007 at 13:07 UTC | |
|
Re: next power of two
by trizen (Hermit) on Sep 11, 2011 at 10:54 UTC | |
by BrowserUk (Patriarch) on Sep 11, 2011 at 13:05 UTC | |
by trizen (Hermit) on Dec 25, 2012 at 16:08 UTC | |
|
Re: next power of two
by JavaFan (Canon) on Sep 11, 2011 at 15:15 UTC |