Very tricky++!
And it works with
strict and
warnings, too!
In preparing my analysis I was initially fooled by a subtle use of
character ranges in the translation operator.
#! perl
# original code after perl -MO=Deparse and perltidy
# s/us(?=r)/he/, print($_)
# if ( $_ = "(*_=*')=~y#!perl -e hk #rJust -`neocheat#,*_;\n$^X hacke
+r!" ) =~
# s[.*;][($_ = $&) =~ tr/*/$/, $_;]ee;
use strict;
use warnings;
# analysis
$_ = "(*_=*')=~y#!perl -e hk #rJust -`neocheat#,*_;\n$^X hacker!";
# $^X = $EXECUTABLE_NAME must be "perl" for this to work
$_ =~ s[.*;][($_ = $&) =~ tr/*/$/, $_;]ee;
# $MATCH and $POSTMATCH
# $& = "(*_=*')=~y#!perl -e hk #rJust -`neocheat#,*_;";
# $' = "\nperl hacker!";
# first eval
# $_ = "($_=$')=~y#!perl -e hk #rJust -`neocheat#,$_;";
# tr/// with [ -e] shown partially expanded
# !perl -`abcde hk
# rJust -`neocheat
# second eval
# $_ = "\nJust anotusr";
# s///
# $_ = "\nJust anotusr\nperl hacker!";
s/us(?=r)/he/; # $_ = "\nJust another\nperl hacker!";
print($_);
|