Like jima, I have also written a symmetrical Perl script inspired by the C program at http://cpcug.org/user/jelks/misc/geek/palindrome_c.html. (I was more impressed with mine before I saw jima's. :)

Instead of a JAPH, I duplicated the output of the C script. I also avoided the use of comments, but used other tricks instead.

#!/usr/bin/perl -- -- lrep\nib\rsu\!# s (^) ~\xfffx/~ , $ tnirp = $_ , q , _$ = print $ , ; s <.*.> "Able was I ere I saw elbA" .m!.!m. rof ; for (;s{} {}s;) { print $ & & $ tnirp } print $ /;\ $ tnirp __END__ __DNE__
Note that the Perl code is much shorter than the C code. :D

Replies are listed 'Best First'.
Re: symmetrical.pl
by duct_tape (Hermit) on Dec 08, 2000 at 03:47 UTC
    Just curious, but were you trying to create some sort of figure with the code? I can't help but to see the shape of a person (besides that oddity on the hips).
    _ ( ) ____|____ ' __|__ ` / \ / \ -` '-
    That is a small representation of what i see. Very cool. I always enjoy seeing code that is shaped like something (even if it wasn't intended :) Anyone else see it?

    - Brad
      It is a neat shape... but it's really a coincidence that it's shaped like a person. (Rorschach Perl?) That's just the way the code came out.
        I've seen an image of a rabbit or a squashed cat that looks a lot like that. Coincidence I suppose! The ears hanging out to the side, arms flat against the surface, haunches and feet.