merlyn@iwarp.intel.com (Randal Schwartz) (02/12/90)
In article <1396@kuling.UUCP>, jand@kuling (Jan Dj{rv) writes: | :print pack('C25', grep($_ && $_ -= 256, split(/(\d\d\d)/, <<STRANGE))); | :330373371372288353366367372360357370288336357370364288360353355363357370300 | :STRANGE | | I thought you spent the afternoon constructing your "motto" in strange perlian | ways. :-) This last one was hairy, but shouldn't there be a trailing space? A trailing space? Where? I ran the thing through Perl (what? he tested the code? :-), and it came out right. And, it only took a few minutes for this one, once I had the basic idea in mind. First, the encoding: for (unpack('C25', 'Just another Perl hacker,')) { printf "%03d", $_ + 256; } to generate the '330...300' line. The decoding was tricker, because the split generated 0, 330, 0, 373, 0, 371, 0... so I used grep to toss the odd bytes, being the grep nut that I am. So, when are we going to have the first annual Obfuscated Perl contest? I have a number of entries, most of them production code! :-) $_="wHFG NABGURE cREY UNPXRE,";y/a-zA-Z/N-ZA-Mn-za-m/;print; -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/