sub next_power_of_two ($) { my %s; @s{1..$_[0]} = (); return substr(%s,1+index(%s,'/')); } print next_power_of_two(257);