A real perl5 japh hack 8-) 
Author Message
 A real perl5 japh hack 8-)

Quote:

>I made it! A real perl5 japh hack. :-) Can it be made shorter?
>  #!/usr/local/bin/perl
>  $r=[[' ',[[r,[t,u]],[[h,[c,o]],[J,l]]]],[[[p,k],['s',',']],[[a,n],e]]];
>  $_=unpack("B*",unpack "u*",'-TO*QF/%Q"YE;68I=.```');
>  sub e { ref $_[0] ? e($_[0]->[chop]) : print $_[0]; }
>  e$r while length;

perl5 -e 'print "Just another Perl hacker\n";'

Sorry, couldn't resist...



Fri, 11 Apr 1997 17:05:10 GMT  
 A real perl5 japh hack 8-)


: >  #!/usr/local/bin/perl
: >  $r=[[' ',[[r,[t,u]],[[h,[c,o]],[J,l]]]],[[[p,k],['s',',']],[[a,n],e]]];
: >  $_=unpack("B*",unpack "u*",'-TO*QF/%Q"YE;68I=.```');
: >  sub e { ref $_[0] ? e($_[0]->[chop]) : print $_[0]; }
: >  e$r while length;

: perl5 -e 'print "Just another Perl hacker\n";'
: Sorry, couldn't resist...

Sorry, but the two are not equivalent, when called with option -w. The second
one doesn't write:

Unquoted string "r" may clash with future reserved word at /tmp/x line 2.
Unquoted string "t" may clash with future reserved word at /tmp/x line 2.
Unquoted string "u" may clash with future reserved word at /tmp/x line 2.
Unquoted string "h" may clash with future reserved word at /tmp/x line 2.
Unquoted string "c" may clash with future reserved word at /tmp/x line 2.
Unquoted string "o" may clash with future reserved word at /tmp/x line 2.
Unquoted string "l" may clash with future reserved word at /tmp/x line 2.
Unquoted string "p" may clash with future reserved word at /tmp/x line 2.
Unquoted string "k" may clash with future reserved word at /tmp/x line 2.
Unquoted string "a" may clash with future reserved word at /tmp/x line 2.
Unquoted string "n" may clash with future reserved word at /tmp/x line 2.
Unquoted string "e" may clash with future reserved word at /tmp/x line 2.
Use of uninitialized value at /tmp/x line 3.

so you have to add a few statements to detect the -w switch and act
accordingly :-)

                                claudio
--
Claudio Nieder (3.329), Alcatel STR AG, Friesenbergstr. 75, CH-8055 Zrich

(************      Computer: The best toy ever invented      ************)



Sat, 12 Apr 1997 23:42:40 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. JAPH hack--can you shrink this code?

2. Hacking JAPH

3. another JAPH for JAPH's sake

4. Here is a Perl5 member variable hack

5. freeing memory for real in perl5

6. Setting real/effective UID under Perl5.003 on solaris

7. real stupid real quick win95/perl ??

8. JAPH T-Day

9. Perl 5 JAPH!

10. FAQ 1.14 What is a JAPH?

11. FAQ 1.14 What is a JAPH?

12. FAQ 1.14 What is a JAPH?

 

 
Powered by phpBB® Forum Software