good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Yet another (easy) oneby jbrugger (Parson) |
on Nov 08, 2006 at 14:51 UTC ( [id://582885]=obfuscated: print w/replies, xml ) | Need Help?? |
Should not that hard to explain :)
my @s = ("\117"=>"\142","\146"=>"\165","\163"=>"\143","\141"=>"\164","\151"=>"\157"=>"\156");
As you know a , and => are the same, using octal numbers to present the chars. Here stands: my @s = qw( O b f u s c a t i o n ); Next my ($c) = $^X =~ m/(?:.*[\/|\\]){0,}(\w+)/; does match the last word in /usr/wherever/perl or c:\wherever\perl and put the match in $1, that's placed in $c update: Changed the regexp, so perl perl.exe and c:\.... or /usr/bin etc all match. Notice the ?: in the first group, it means this group is not saved in the enclosing group. then printing:... uc(++$s[8]) prints uppercase ++i = J :) the rest seems obvious.
"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.
Back to
Obfuscated Code
|
|