Not all that obfuscated, but how could I resist
the
"Hack another just perler" anagram ?
Runs under both BASIC (tested with yabasic-2.66) and
perl. Neither "-w" or "use strict;" is very happy with
it though :)
REM ;for(<DATA>){
REM ; chomp;s;\c0\$;\$\c0;;s; ^\d0;;x;
REM ; s;(\w)\w+\$\(;\1\(;x;/(\d+),(\d+)/||{$;=$1,/(\d)/};
REM ; $2?{$==$1-1,$:=$2}:{$:=$1,$==0,$;eq"r"&&{$=-=$:}};
REM ; s;$1,*\d*;$=,$:;;$:&&s;\w\(;substr\(;;eval;}
REM ; print "\n";
REM ;__DATA__
10 p$="hack another just perler"
20 print mid$(p$,14,4);
30 print mid$(p$,5,8);
40 print mid$(p$,18,5)," ";
50 print left$(p$,4);
60 print right$(p$,2)
Update:
Based on this
reply from
BooK, here's
something a little closer to a
polyglot:
REM ;$_=<<REM;
sub japh()
REM
REM ; $_.="{" . <<'REM ;';
print "Just another Perl hacker\n";
REM ;
REM ;$_.="}";eval;<<'REM';
end sub
REM
japh()
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.