in reply to Re: JAPH palindrome.
in thread JAPH palindrome.

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/!#

Replies are listed 'Best First'.
Re^3: JAPH palindrome.
by JavaFan (Canon) on Sep 25, 2010 at 10:17 UTC
    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/!#