Recent releases of Perl opened a new avenue of exploration the dark corridors of which I will probably never tread again after finding nothing but trouble on this my first expidition. This obfu has been thoroughly fumigated, and thus is safe, but not necessarily sound. I wouldn't expect much if you're running pre 5.8.0, and even those with more recent versions have had mixed results. I hesitated posting it, but I'm mostly curious to hear about its behavior.
$|=$i{rek}=q;>;x2;;$i=join"",map{(split//,"tsuJ")[$_]}(split//,3210);
open i,$i{rek},\$i;print i" another lreP";close i;($;,$:)=$i=~m=^(.+
\s)(\s\S+)$=x;$i{caH}=open i,$i{rek},\$;;@_=map{scalar reverse$_}sort
keys%i;print i+scalar(reverse$:),@_[0,-1],$/;close i;print$;
UPDATE: This obfu is based on features only available in 5.8.0 and beyond. Earlier Perl versions just won't do anything. Even for users of 5.8.0, some tinkering may be needed to get the desired output. If you find that it doesn't work by running it as "perl obfu", try it is "perl -w obfu". And if that doesn't work, put a shebang line at the top and run it simply as "obfu" (or whatever you want to name the file). The point is, it's known to be tempermental.
Read on to find out why it might be so tempermental...
This JAPH relies on the
open function's ability to open a file to memory (rather than physical storage) by passing a reference to a scalar where one would normally pass a filename. The perldocs discuss doing this, and show such a "memory file" being opened in ">" mode. I'm opening it in ">>" (append mode) and writing to it a couple of times. After each write I close the filehandle so that the buffer gets flushed. I also have $| set, to autoflush. Nevertheless, this JAPH *may* (or may not) suffer from a dirty buffer situation, so your mileage may vary. It *should* work (from what I know), but clearly there's more than meets the eye in this newly implemented "feature".
Dave
"If I had my life to do over again, I'd be a plumber." -- Albert Einstein
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.