in reply to Re^3: (Challenge) Rotateable numbers
in thread (Challenge) Rotateable numbers
sub r2{ $_=$_[0];y/2569347/5296/;pop==reverse } my @tests = (0..9); print "$_: ",(r2($_)?'Yes':'No'), "\n" for @tests; __DATA__ 0: Yes 1: Yes 2: Yes 3: Yes 4: Yes 5: Yes 6: Yes 7: Yes 8: Yes 9: Yes
Because of the way I was calling your function, I saw something wrong. However, I mistook what I saw wrong and I apologize for not knowing tr/// as well as I should have.
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
|
|---|