in reply to Re: (Challenge) Rotateable numbers
in thread (Challenge) Rotateable numbers
The reason tachyon's version doesn't work is not because of removing the 347, but because he golfed away the localisation of $_.
P:\test>type junk.pl sub is_rotatable{ #234567890123456789012345678901234567 $_=$_[0];y/2569347/5296/;pop==reverse } printf "%s %s rotatable\n", $_, is_rotatable( $_ ) ? 'is' : 'not' for 33, 131, 141, 171, 25696925, 101, 88; P:\test>junk Modification of a read-only value attempted at P:\test\junk.pl line 3.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: (Challenge) Rotateable numbers
by tachyon (Chancellor) on Sep 17, 2004 at 02:51 UTC |