Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
#!/usr/bin/perl -w use#me strict;use#emacs! integer;my@cam=map{0+(eval" 0b$_")+1}map{s!(...)!'$1',!gxgxg; eval"($_)"}map{sprintf"%.9b",hex}("0", "0","0","0","0","db","db","a2","114","e2", "112","92","10","80","0" ,"30",qq@180@, "186",qq'1b6',"1a6", "003"+123, "135","1ff",q~1ff~, "91"-10, "12",qq^41^,q:93:, "e5","1b6" ,"1fe", "0",q&49&,qq;92;, "9a","30","0", q%35%, "1b6","1f8",q=0=, "1",qq#49#,"49", q!52!, "92",q{e4},"12d", "176","1b6","1b6" ,"1be" ,"1c8","b",q[48], "35","199","12f", "140", "1",qq(88),q-3e-, qq+f3+,qq*13c*, "140", "1c7","161","12c", q/55/, q;;. "10c", "124","124","125" ,q<7>, q"140", "2","122","7","1ac" ,"000","000","000" ,"000","000","000" ,"000","000" ,"000","000","000" , +## "000","000","000", qq|000| +); open$_,$0;undef$/; $_=<$_>;;s<[\ +n \s]+><>gix;my$ec=(q ~ ~x54 .qq, \n,)x25; my$in=0.0;my$out;my $klin=$^O=~m~win~ix?qq"cls": qq$clear$;while(1.){ my$ecr=$ec;;my($coL,$col)=( 19,00);my$car;for my $mv(@cam){A:{if($col==0 &&$coL==q=19=){$car= $out,last A if defined $out and$out ne qq . .;;$car=(++$|+$in< length and substr$_, $in++,1 or q- -),# last A;;;;}--$coL,-- $col;;;;$ec=~m;(?: [^\n\r]*\n){$coL}(?: [^\n\r]{0,$col})(# [^\n]?);mix;;++$col,++ $coL;;$car=defined( $1)?$1:q[ ];}$coL-=($mv <6)?1:0;$col+=(!($mv&4) ||(vec($mv,0,2)==3))?1:0;$col-=(($mv&4)||(vec($mv,0,2)== 3))?1:0;$coL+=(($mv>4)||($mv==1))?1.:0.;$out=$car if( $col==0);--$coL,--$col;$ecr=~s[((?:[^\n]*\n){$coL}) ([^\n]{0,$col})([^\n]?)][$1.$2.(q? ?x(length($2) -$col)).$car]mex;++$coL,++$col; }$ec=''. $ecr;system$klin;print $ec;} #!

Note 1: 5.6 required. Thanks to chazzz for testing it under Windows.
Note 2: that's supposed to be a flower, on the right :) (in the output).
Update: changed a character or two, trying to make it work for windows addicts (thank you Ven'Tatsu for your remark).

In reply to GGGraffiti by Blop

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (1)
    As of 2017-04-26 19:22 GMT
    Find Nodes?
      Voting Booth?
      I'm a fool:

      Results (488 votes). Check out past polls.