Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Revisionism, Perl-Style

by MeowChow (Vicar)
on Feb 02, 2001 at 23:25 UTC ( [id://56069]=obfuscated: print w/replies, xml ) Need Help??

s s s six, s s slaves, s slaves join abe, chop, chop, chop, chop sexmix, s label leg, s up? uevaluesex

Yes, this bizarre thing actually compiles and runs, and is arguably useful.

Replies are listed 'Best First'.
Re: Revisionism, Perl-Style
by spaz (Pilgrim) on Feb 03, 2001 at 01:12 UTC
    I have no idea what this does (it doesn't do anything on my system) but for those interested, here's what it comes out as.
    s/ / \n/xi, s/ \n/lave/, s/lave/join 'abe', chop $_, chop $_, chop $_, chop $_;/eimx, s/abe/();/eg, s/p? \n\n/eval $_;/exes;
      Close, but no cigar :P

      Remember, newlines within substitutions/matches that are modified by /x are ignored. Take out your '\n's and the de-obfuscated code "does the right thing", namely the last substitution finds a match, evaluates the substitution expression, which is an eval instruction which in turn evaluates the string "eval", contained by that time in $_, which leads to endless recursion.

         MeowChow                                               
                      print $/='"',(`$^X\144oc $^X\146aq1`)[-2]
        Looks like spaz has uncovered a bug in B::Deparse.
        % perl -le 'print "a" =~ /a' -e '/x' 1 % perl -MO=Deparse -le 'print "a" =~ /a' -e '/x' -e syntax OK print 'a' =~ /a\n/x; % perl -le 'print "a" =~ /a\n/x' %
        Oops!

        (I'm taking advantage of the implicit newline for -e.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-03-29 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found