Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Ok, i've been hanging out here almost two months, and I guess sooner or later I have to do a JAPH obfu, right? Is there any tradition of writing these when there's more pressing, productive things to do? If so, I've been true to tradition...
#!/usr/bin/perl -w use strict;my% g = ('D\J{N]QRR\&S.HAy7z9 r['=>' => got perl ? <= ');my@ o = keys%g;my@ t = split"",(shift@o);my$ p = pack'c',74;my$ e = sub{while(@_){my$ r = shift;$!=unpack'c',$r;my$ l = shift;$p.=substr$!,(unpack'c',$l)/10, (unpack'c',$l)%10;}}; &$e(@t);print$p,$/;

Despite use strict, it may not work on versions of perl with drastically different error messages ;)

Update: As chipmunk has pointed out, this code relies on system error messages, not Perl error messages. As a result, it will only run properly on a FreeBSD 4.x system. (By pure luck, it's been tested on 4.1 and 4.3, but only because I happened to upgrade my system between printing out the error messages and actually writing the code.)

So consider my first JAPH a real learning experience, and a bit more obfuscated than planned - even when it runs, one does not know what it did ;-)

Maybe I should have called it "Got FreeBSD?"

Thanks, chipmunk!


In reply to got perl? by ginseng

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-03-19 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found