in reply to JAPH palindrome.

Now, trying to create a JAPH palindrome without the use of comments or DATA?
;;print "Just another Perl hacker";s;"rekcah lreP rehtona tsuJ" tnirp; +;
It also mirrors the spaces.

Extended to use the shebang line:

#!/usr/bin/perl -- !m ;;;print "Just another Perl hacker"; s ;"rekcah lreP rehtona tsuJ" tnirp;;; m! -- lrep/nib/rsu/!#

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

    That truly is awesome looking, but it isn't working on my Perl 5.10

    jbm@Foucault:~/Code/perl $ ./javafan.pl Can't open perl script "!m": No such file or directory jbm@Foucault:~/Code/perl $ perl -v This is perl, v5.10.0 built for darwin-thread-multi-2level (with 2 registered patches, see perl -V for more detail) jbm@Foucault:~/Code/perl $ cat javafan.pl #!/usr/bin/perl -- !m ;;;print "Just another Perl hacker"; s ;"rekcah lreP rehtona tsuJ" tnirp;;; m! -- lrep/nib/rsu/!#
      I'm a bit surprised darwin doesn't like that. Anyway, here's a modification that doesn't use anything after '/usr/bin/perl' on the same line:
      #!/usr/bin/perl !m;;;print "Just another Perl hacker" ;s; "rekcah lreP rehtona tsuJ" tnirp;;;m! lrep/nib/rsu/!#
      An alternative:
      #!/usr/bin/perl print "Just another Perl hacker" ;!q!; "rekcah lreP rehtona tsuJ" tnirp lrep/nib/rsu/!#