UPDATE: FYI That's 122 including the sub, 102 without. OP was 281 less the whitespace though some easy shavings existed such as s/=>/,/g.sub is_rotateable{ local $_ = shift; # Shave two # y/23467/5XX9X/; # return 0 if /X/; y/26/59/; return 0 if /[347]/; @_ = split//; while( @_ > 1 ){ return 0 unless shift == pop; } return 1; }
--
I'm not belgian but I play one on TV.
In reply to Re: (Challenge) Rotateable numbers
by belg4mit
in thread (Challenge) Rotateable numbers
by FoxtrotUniform
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |