in reply to How can I tell if a number is a power of 2?
my$a=256; for(my$b=1;$b<1E9;$b*=2) { if($a==$b){print'Match!';last;} } [download]