Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Chomped JAPH

by davido (Cardinal)
on Aug 14, 2003 at 20:12 UTC ( [id://283993]=obfuscated: print w/replies, xml ) Need Help??

Here's my second post of a "JAPH". Go easy on me. ;) If you figure it out post a reply, and definately if you have suggestions on how it could be improved upon, I'd love to hear. This continues to be a learning experience for me.

For reasons obvious to those who have figured out how this tidbit works, it doesn't fit into the customary four lines of a JAPH. But it will still execute from the shell prompt as perl -e 'pasted code'
Fun huh? It was at least as difficult to implement as my morse code JAPH, posted a few days ago, and takes considerably more time to execute as there is a lot more going on in the creation of the text. But efficiency isn't the goal of a JAPH, now is it? ;)

If you cut and paste it, be sure to turn it into a one-liner. Any whitespace, including EOL (\n) is going to be significant, and adding EOL's to the literal would probably break it.

I've tested it under Perl 5.6.1 on a Linux-powered Sharp Zaurus PDA, on my Win98 machine with Perl 5.8.0, and on my ISP's Unix based system with Perl 5.8.0.

Here's the code. Enjoy!


$d=";;;;;;;;;;;;;;;::::::::::::::::::::::::::::::::::::::::::::::::::: +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::::::::::::::::::::::::::::: +:::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::::::::::::::::: +::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::::::::::::::::::::::::::::::::::: +::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::::::::::::::: +::::::::::::::::::::::::::::::::;:::::::::::::::::::::::::::::::::::: +:::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::::::::::::: +:::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;::::::::::::::::::::::::::::::::::::::::::::::::;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::::::::::::::::::::::::::::::: +;:::::::::::::::::::::::::::::::::::::::::::::::::::::;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::::::::::::::::::::::::::::: +::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;";wh +ile (m@(["$_"])\1*$@){$/=$&;print chr((chomp)+(unpack"c",$")-1)}print +"\n"
"If I had my life to do over again, I'd be a plumber." -- Albert Einstein

Replies are listed 'Best First'.
Re: Chomped JAPH
by davido (Cardinal) on Aug 18, 2003 at 09:07 UTC
    I'm going to reply to my own post here to post an updated version of the preceeding JAPH. It does the same thing, and still uses chomp as its engine, but now the actual script is shorter, more obfuscated, and pulls a couple of Perl tricks that the previous version didn't attempt.

    Here's the updated version. Post a reply if you figure it out, or if you have comments that might nudge me along my quest for wisdom. ;)

    $_=";;;;;;;;;;;;;;;::::::::::::::::::::::::::::::::::::::::::::::::::: +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::::::::::::::::::::::::::::: +:::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::::::::::::::::: +::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::::::::::::::::::::::::::::::::::: +::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::::::::::::::: +::::::::::::::::::::::::::::::::;:::::::::::::::::::::::::::::::::::: +:::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::::::::::::: +:::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;::::::::::::::::::::::::::::::::::::::::::::::::;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::::::::::::::::::::::::::::::: +;:::::::::::::::::::::::::::::::::::::::::::::::::::::;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::::::::::::::::::::::::::::: +::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;";wh +ile(m&(\S)\1*$&){$/=$&;$,.=chr((chomp)+(unpack"c",$")-1)}$,.=qq;\n;;p +rint'',''

    Enjoy!!!

    Dave "If I had my life to do over again, I'd be a plumber." -- Albert Einstein

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-19 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found