Following on from Tick-tock, the following obfuscated code has been tested to execute cleanly on both Linux and Windows - This code differs markedly from my previous obfuscation in that the code below is also a self-modifying quine, albeit, this quine behaviour is achieved through performing a seek on the DATA file handle.

I am considering my obfuscation fix now thoroughly purged! :-)

#!/usr/bin/perl ' ....... '; ' .. .. '||print"Tick-Tock 2, a self-modifying quine"; ' .. .. '&&seek+DATA,!++$|,0;@ot=<DATA>;for($[..$#ot){ ' . . '&&($ot[$_]=~/^[^']/)&&next;$c=substr($ot[$_], ' . . '+1,22);$c=~s/[^\.\s]/ /g;substr($ot[$_],1,22+ ' . . ',$c)};for(0..359){$c[$_]=[cos(atan2(1,1)/45*( ' . . '+$_-90)),sin(atan2(1,1)/45*($_-90))]};@time=( ' . . ',localtime)[2,3];$o=join'',@ot;$l=0;for($[..( ' . . '+10)){$l+=length($ot[$_])+1};$l++;for(1..((9+ ' . . '))){substr($o,$l+int($_*$c[($time[0]*6)][1]*( ' . . '+1))*71+int($_*$c[$time[0]*6]->[0]),1,'m');}; ' . . ';for(1..4){substr($o,$l+int($_*$c[($time[1+(( ' . . '))]%12)+($time[0]/60)*30][1])*71+int($_*$c[0+ ' . . '+(($time[1]%12)+$time[0]/60)*30][0]),1,'h');; ' . . ';};sub rnd{$v=CORE::int$_[0]*10**$_[1]+.5;1&& ' . . ';$v=~s;(.{$_[1]})$;\.$1;;(substr($v,0x0-1+((( ' . . '))))eq'.')&&do{chop$v};$v};END{((defined$o)&( ' . . '||1));print$o;sleep(30);eval$o};sub int{0x1&& ' .. .. ';rnd(shift,0)};BEGIN{$s=($^O=~/MSWin/i)?do{1& ' .. .. ';'cls'}:('clear');system($s)}; ' ....... '; __DATA__

 

perl -le 'print+unpack("N",pack("B32","00000000000000000000001000101000"))'


In reply to Tick-tock 2, a self-modifying quine by rob_au

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



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.