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()