in reply to Re: Revisionism, Perl-Style
in thread Revisionism, Perl-Style

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]

Replies are listed 'Best First'.
Re: Re: Re: Revisionism, Perl-Style
by chipmunk (Parson) on Feb 03, 2001 at 02:06 UTC
    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.)

      Good catch. AFAIK, B::Deparse is frought with bugs, as it is... I can rarely get it to deparse anything but the simplest Perl.
         MeowChow                                               
                      print $/='"',(`$^X\144oc $^X\146aq1`)[-2]