http://qs1969.pair.com?node_id=523106

Ok, so today is an EXCEPTIONALLY boring day, here's something I whipped together this afternoon:
#!/usr/bin/perl $palindrome="Jarred arts sell less, Trader Raj!"; @daTa=split //,$p +alindrome; $Palindrome="A Danish custard--drat such sin, Ada"; @Data=split //,$P +alindrome; $palIndrome="O, Lisa sees a silo!"; @DAta=split //,$p +alIndrome; $palindrOme="Pets never even step"; @daTa=split //,$p +alindrOme; $palindroMe="Kayak salad - Alaska yak"; @DaTa=split //,$p +alindroMe; @ATAD = <DATA>; @A = @DAtA; @B = @dATA; @C = @daTA; @D = @daTa; @ +d = @data; $DATA=join'',@ATAD; for( reverse split //, $DATA ){ $ATAD .= $_ }; $_= +$ATAD;eval #print "\u$D[0]\L$A[10]$a[3]$a[2] \l$A[0]$A[4]\l$T[0]$a[2]$A[7]$a[1]$D +[2] " # . "\u$a[0]\L$a[1]$D[2]$T[-3] $A[7]$D[1]$A[9]\l$d[0]$a[1]\l$D[-4]," +; __DATA__ + __ATAD__ # ;",]4-[D$l\]1[a$]0[d$l\]9[A$]1[D$]7[A$ ]3-[T$]2[D$]1[a$L\]0 +[a$u\" . # " ]2[D$]1[a$]7[A$]2[a$]0[T$l\]4[A$]0[A$l\ ]2[a$]3[a$]01[A$L\]0[D +$u\" tnirp ;} _$ =. DATA$ {) ATAD$ ,// tilps esrever (rof ;DATA@ ,'' nio +j = ATAD$# ;atad@ = d@ ;aTad@ = a@ ;ATad@ = T@ ;ATAd@ = A@ ;AtAD@ = D@ ;>ATA +D< = DATA@ ;eMordnilap$,// tilps=atad@ ;"kay aksalA - dalas kayaK"=e +Mordnilap$ ;emOrdnilap$,// tilps=aTad@ ;"pets neve reven steP"=e +mOrdnilap$ ;emordnIlap$,// tilps=ATad@ ;"!olis a sees asiL ,O"=e +mordnIlap$ ;emordnilaP$,// tilps=ATAd@ ;"adA ,nis hcus tard--dratsuc hsinaD A"=e +mordnilaP$ ;emordnilap$,// tilps=AtAD@ ;"!jaR redarT ,ssel lles stra derraJ"=e +mordnilap$ lrep/ +nib/rsu/!#
Enjoy.

Replies are listed 'Best First'.
Re: fun with palindromes
by turo (Friar) on Jan 14, 2006 at 02:27 UTC

    Oh God! i feel like i'm drunk ... hic ....
    More than palindrome you could called it mirror or something like that ...
    I think, i can make the same effect with some code, a mirror, a digital camera, gimp||photoshop, a character recognition application :

    Step 1) Take a photo of your initial code on your screen Step 2) Put the mirror in front of your screen +--------+ | Screen | +--------+ || +---------+ +----------+ | Mirror1 | <-> | Mirror 2 | +---------+ +----------+ Step 3) take a photo of the 'mirror 2' Step 4) save the two photos to your Hardisk Step 5) open your gimp||photoshop Step 6) Join the two photos Step 7) Pass the ocr Step 8) saves the result, and get so many errors when trying to compile it hehehe

    What can i say; your code is ingenious, and very obfuscated (understanble, but harmfull to any who wants to read it!), i promise that while i was reading it, i startet to see aTaD as the correct one instead of DaTa ... reverse reading ufff, bad thing! (You gained it: $chargrill++)

    cheers

    perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'
Re: fun with palindromes
by liverpole (Monsignor) on Jan 14, 2006 at 00:59 UTC
    It's brilliant!  ++chargrill

    @ARGV=split//,"/:L"; map{print substr crypt($_,ord pop),2,3}qw"PerlyouC READPIPE provides"