Given that it does not report 33 as rotatable I don't see your point. Also the digits 347 are not stripped, they are replaced with the digit 6, see the man for tr. It would not actually matter if they were stripped or replaced the original value will not be equal to the reversed value.
sub is_rotatable{ #234567890123456789012345678901234567 $_=$_[0];y/2569347/5296/;pop==reverse } for my $i(3,33,131,141,171,25696925,101,88) { printf "%s %s rotatable\n", $i, is_rotatable( $i ) ? 'is' : 'not' } __DATA__ 3 not rotatable 33 not rotatable 131 not rotatable 141 not rotatable 171 not rotatable 25696925 is rotatable 101 is rotatable 88 is rotatable
cheers
tachyon
In reply to Re^3: (Challenge) Rotateable numbers
by tachyon
in thread (Challenge) Rotateable numbers
by FoxtrotUniform
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |