Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

A small (for me) JAPH

by c-era (Curate)
on Dec 23, 2000 at 01:51 UTC ( #48099=obfuscated: print w/ replies, xml ) Need Help??

I know some of you are going to think that I didn't write this one. After all it is much smaller, doesn't require IE or windows, and just prints out "Just Another Perl Hacker". Nevertheless, I did write this one (I needed a break from writing xs).

Those more experianced in perl should quickly know what I did, the rest of you will have to figure it out (it's a good learning experiance).

($_='Just Another Perl Hacker,' and$ # There's the string :: { join '', /\b\w/g } =$ # This is the magic :: { (split "")[2]^chop })&& # Here's the question print $JAPH;

Comment on A small (for me) JAPH
Download Code
(Ovid) Re: A small (for me) JAPH
by Ovid (Cardinal) on Dec 23, 2000 at 02:21 UTC
    Beautiful! That's a nifty way of putting that together :)

    Warning: Spoiler Hint Follows

    With c-era's permission, I offer the following hint to aspiring obfuperl coders: add the following two line to the end of the JAPH and study the output CAREFULLY:
    use Data::Dumper; print Dumper( \%main:: ); # <- Hmm, what's that?

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Re: A small (for me) JAPH
by BooK (Curate) on Dec 23, 2000 at 03:45 UTC

    You might want to look at the optimised code with perl -MO=Deparse:

    Spoiler

    print $JAPH if $_ = 'Just Another Perl Hacker,' and $main::{join '', /\b\w/g} = $main::{(split(//, $_, 0))[ +2] ^ chop $_};

    Nice use of symbolic references and ^...

    The xor part reminds me of my own $A++ under constraints.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://48099]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (17)
As of 2015-07-02 17:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (44 votes), past polls