http://qs321.pair.com?node_id=155265


Calculate the closest power of 2, rounded up, the wrong way. ;-)
#!/usr/bin/perl -l use strict; sub powa2 { ; local %_ = @_ ; keys %_ = pop ; $_ = %_ ; split '\/' ; pop } __END__ print powa2(63); # prints 64 print powa2(64); # prints 64 print powa2(65); # prints 128 print powa2(1234); # prints 2048

--
John.