Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: JAPH palindrome.

by blokhead (Monsignor)
on Sep 24, 2010 at 23:11 UTC ( #861910=note: print w/replies, xml ) Need Help??

in reply to JAPH palindrome.

Cute idea, but the reverse of this line:
print fi ('Just another Perl hacker,');
is not what you have written; it's this unfortunate thing:
;)',rekcah lreP rehtona tsuJ'( if tnirp
But the code you have does not rely on those parentheses being there, so you are safe.

Also, you have no space in X__ATAD__, but you have a space in __DATA__ X. I guess the "plain-language" definition of a palindrome does ignore spaces. Presumably that can only make the task easier in Perl..


Replies are listed 'Best First'.
Re^2: JAPH palindrome.
by jffry (Hermit) on Sep 25, 2010 at 01:40 UTC

    Thanks, I didn't notice the inverted parenthesis, obviously. That's what I get for checking manually. I also didn't realize, as this script evolved, that I no longer had use for the parenthesis at all. At one point, adding them was necessary for a successful compile.

    Yes, I went with the rule that whitespace and newlines did not have to match.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://861910]
[Discipulus]: finally a relaxing workday! good morning mnks!
[Lady_Aleena]: I hope you have a wonderful day Discipulus. 8)
[Corion]: A good morning to you too ;)
[choroba]: Good morning, Monks!
[Corion]: And a good daypart to you as well, Lady_Aleena !
[robby_dobby]: Hey monkeys, do you ever get the realization that you're all waking up to chaos? I suppose not :P
[Lady_Aleena]: Good morning Corion, I hope you have a wonderful day as well. 8)
[Corion]: Yesterday I encountered an interesting data structure problem. I have a remote program that emits events, and my client listens for these events with one-shot callbacks, that is, I register the callback and if the event gets generated that callback ...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2017-05-29 07:50 GMT
Find Nodes?
    Voting Booth?