There's more than one way to do things | |
PerlMonks |
Re^5: Challenge: Nearest Palindromic Numberby halley (Prior) |
on Feb 02, 2005 at 19:45 UTC ( [id://427392]=note: print w/replies, xml ) | Need Help?? |
Which is why I initially mentioned that incrementing would be easy, to find the alternative. If the input isn't already palindromic, you have to find two palindromic alternatives. Roy Johnson wrote the code I foresaw: '10##'++ would be '1111'.
--
In Section
Seekers of Perl Wisdom
|
|