Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

How to (ab)use substr

by Erudil (Prior)
on May 03, 2001 at 15:01 UTC ( #77619=obfuscated: print w/ replies, xml ) Need Help??

#!/usr/bin/perl -w # how to (ab)use substr use strict; my $pi='3.14159210535152623346475240375062163750446240333543375062'; substr ($^X,0)= substr ($pi,-6);map{ substr ($^X,$.++,1)=chr( substr($pi,21,2)+ substr($pi,$_,2))}(12,28,-18,-6,-10,14);map{$^O=$"x( substr ($pi,-5,2)); substr ($^O,sin(++$a/8)*32+ substr ($pi,-2)/2+1,1)=$_; substr ($^O,sin($a/4)*( substr ($pi,2,2))+ substr ($pi,-7,-5)-1,1)=$_;print"$^O$/";eval($^X.('$b,'x3). substr ($pi,-3,1).'.'. substr ($pi,9,2));}(map{chr($_+ substr ($pi,21,2))}( substr ($pi,8)x3)=~/../g);

Comment on How to (ab)use substr
Download Code
Re: How to (ab)use substr
by Sinister (Friar) on May 03, 2001 at 15:19 UTC
    Wow!

    This one definitly kicks ass! (excuse the language!)
    Creating JAPH from PI. Man, how long did it take to puzzle it out!

    Sinister donates flowers

    Sinister greetings.
      It's not quite pi -- that would start "3.14159265358979.." Methinks the value of pi was slightly adjusted to make this come out as planned. ;> Still, I'm also in awe.

       
      perl -e 'print "I love $^X$\"$]!$/"#$&V"+@( NO CARRIER'

        You'll notice that it says 'my $pi=...', and not 'the $pi...' so he can have pi be whatever value he likes in his universe. <g>

        --Chris

        e-mail jcwren
        the $pi = '3.14159265358979323845626...' # I think.
SPOILER! (Guildenstern)Re: How to (ab)use substr
by Guildenstern (Deacon) on May 03, 2001 at 21:25 UTC
    Update: *sigh* Apparently, the READMORE tag has some issues. My apologies to all for the long post.

    Well, this is the first obfu from Erudil that I was able to decipher, so I thought I'd break it down and write the spoiler.

Re: How to (ab)use substr
by JSchmitz (Canon) on May 03, 2001 at 23:00 UTC
    This is cool I have been playing with it
(Ovid - We're doomed) Re: How to (ab)use substr
by Ovid (Cardinal) on May 03, 2001 at 23:15 UTC

    Everyone realizes, of course, that the Best Nodes of all time are going to quickly be monopolized by Erudil :)

    However, as far I can see, Erudil fully deserves it :) Once again, nice work!

    Cheers,
    Ovid

    Update: Uh... I deleted part of my post as no longer applicable (if you saw it, you understand) Looks like jcwren is currently the one slated to be kicked off the top 10 list :( Sorry, Chris!

    Update 2: Looks like jcwren survived, despite Erudil once again hitting the top 10 :)

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

Re: How to (ab)use substr
by damian1301 (Curate) on May 03, 2001 at 23:36 UTC
    Damn you! I was going to write an obfu like this...just your is much much better than anything I could ever do.

    You've done it again and you continue to amaze us everytime. Keep 'em comin', boss. :-)

    Tiptoeing up to a Perl hacker.
    Dave AKA damian

Re: How to (ab)use substr
by bobione (Pilgrim) on May 04, 2001 at 12:33 UTC
    Wonderful !!! Splendid !!!
    This JAPH is beautiful and very original.
    It's sure Erudil is getting Best Nodes for Obfuscated of all the time !

    BoBiOne KenoBi ;)

Re: How to (ab)use substr
by jens.joseph (Initiate) on Oct 08, 2008 at 11:20 UTC
    Great, i've tried to understand it before runtime... but i've failed. A wonderful feeling after seeing the result on screen.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://77619]
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: (13)
As of 2014-08-21 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (136 votes), past polls