Update: how it works...#!/usr/bin/perl -w $_='';s..qq:\x77\x68\x69\x6c\x65\x28\x22\x32\x66\x64\x65\x30\x34\x61\x +62\x65\x37\x36\x63\x30\x33\x36\x63\x39\x30\x37\x34\x35\x38\x36\x63\x3 +1\x22\x3d\x7e\x6d\x2f\x28\x2e\x29\x2f\x67\x29\x7b\x20\x70\x72\x69\x6e +\x74\x20\x73\x75\x62\x73\x74\x72\x28\x22\x5c\x78\x32\x30\x5c\x78\x32\ +x63\x5c\x78\x34\x61\x5c\x78\x35\x30\x5c\x78\x36\x31\x5c\x78\x36\x33\x +5c\x78\x36\x35\x5c\x78\x36\x38\x5c\x78\x36\x62\x5c\x78\x36\x63\x5c\x7 +8\x36\x65\x5c\x78\x36\x66\x5c\x78\x37\x32\x5c\x78\x37\x33\x5c\x78\x37 +\x34\x5c\x78\x37\x35\x22\x2c\x68\x65\x78\x28\x24\x31\x29\x2c\x31\x29\ +x3b\x20\x7d:.xee;
|
The substitution regexp evaluates twice. The first eval results in: while("2fde04abe76c036c9074586c1"=~m/(.)/g){ print substr("\x20\x2c\x4a\x50\x61\x63\x65\x68\x6b\x6c\x6e\x6f\x72\x73\x74\x75",hex($1),1); } The string passed to substr() contains one of each unique character in the "Just another Perl hacker," phrase -- in other words, ' ,JPacehklnorstu'. The string used in the while condition contains the single-digit "map" to form the output phrase. As the loop iterates, the regexp iterates over the "map" and prints out the correct character from the hex-encoded string. |
In reply to My first JAPH by radiantmatrix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |