Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Seems straightforward, but...

by myocom (Deacon)
on Jul 06, 2001 at 01:02 UTC ( #94284=obfuscated: print w/replies, xml ) Need Help??

$b="Just another Perl hacker.\nd";$c=uc join'', (split//,$b)[5,1,3,7,16,7,19,26]; chop $b;sub a{$b};eval join'=',map"*$_",qw($c a); print _Obfuscation_();

Replies are listed 'Best First'.
Re: Seems straightforward, but...
by tachyon (Chancellor) on Jul 06, 2001 at 01:35 UTC

    Here is a quick decon:

    $b="Just another Perl hacker.\nd"; # $c=uc join'',(split//,$b)[5,1,3,7,16,7,19,26]; # this line grabs chars out of $b and upper cases # them to give: $c = "AUTOLOAD"; # Hmm somwhow I don't think we are going to see # the crafty assembly of the _Obfuscation_() sub chop $b; # this removes the 'd' from JAPH needed to spell # the word AUTOLOAD sub a{$b}; # here we define a sub called a which returns # the string 'Just another Perl hacker.\n" # eval join'=',map"*$_",qw($c a); # this is eval *$c = *a; # otherwise written as: # *AUTOLOAD = *a; # or more traditionally sub AUTOLOAD {a()}; print _Obfuscation_(); # print AUTOLOAD sub which is a() which returns JAPH




(dissection) Re: Seems straightforward, but...
by japhy (Canon) on Jul 06, 2001 at 01:38 UTC
    The subject is enough of a warning.
    $b = "Just another Perl hacker.\nd"; $c = uc join '', (split//,$b)[5,1,3,7,16,7,19,26]; # $c is now "AUTOLOAD" chop $b; # to remove the "d" sub a{$b}; # this makes &a return $b eval # *AUTOLOAD = *a join '=', # '*$c = *a' map "*$_", # '*$c', '*a' qw( $c a ); # '$c', 'a' print _Obfuscation_(); # calls AUTOLOAD()

    japhy -- Perl and Regex Hacker

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://94284]
Approved by root
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2017-02-26 02:38 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (371 votes). Check out past polls.