Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Not sure of my fascination with this, but liverpole's Spatial Japh got me interested in animated ascii graphics. That, along with greats such as How to (ab)use map and How to (ab)use substr and my own contribution to the (ab)use series (Ab)using fo(u)r...... all inspired me to abuse 'or':

#!/usr/bin/perl $oar=3;$nor=0;$xOr=0;use Time::HiRes qw(usleep );$oAr=5;sub or{for my$xor(0 ..9){for my$or(0..65){$ oar[$xor][$or]=' '}}}%or=(aor=>2 ,bor=>4,cor=>3,dor=>4,eor =>6,gor=>7 ,hor =>6, jor=>8 ,lor=> 27,mor=> 30, nor => 61, oor => 63,por=> 64 ,qor =>65); while( 1){ for$ OR(a..d ){if(( $OR eq 'b')or($ OR eq'c' )){$or {aor}++ ;$or{cor }++;$or{ dor}++; $or{eor} --;$ or{ gor}--;$ or{jor} --;}else {$or{aor }--;$or{ cor}--; $or{dor} --;$ or{ eor}++;$ or{gor}++;$ or{jor}++;}& or;for([ $or{aor} ,$or{bor}],[$or{aor},$or{ lor}],[$ or{bor}, $or{mor}],[$ or{bor}, $or{nor} ],[$ or{ cor},$or{ oor}],[ $or{cor} ,$or{por }],[$or{ dor},$ or{qor}] ,[$ or { eor},$or {qor}] ,[$ or { gor } ,$ or{por}] ,[$or{ gor},$or {oor}],[ $or{hor} ,$ or { nor}],[ $ or{hor},$ or{mor}] ,[$ or{ jor},$ or{ lor}],[$or {jor },$ or{bor}], [$or{hor},1 ],[$or{bor} ,1],[$or{ aor},$ or{ bor}]){nor($ _->[0],$_->[ 1])}oar ($ OR);usleep( 300000);}}sub ore{$OR=shift ;$oar=3;if( $OR eq'a'){$ oR=sub{uc shift}}if($OR eq'b'){$oR= sub{shift}} if($OR eq'c' ){$ oR=sub{'-'}}if($ OR eq'd'){$oR= sub{shift}} $yor=',rekc' .'ah '.'lraoP '.'rehtona tsuJ';@ or =split//,~~ reverse$yor; for($oar..((length$yor)+$ oar-1)){$ oar[$oAr][$ oar++]=&{$oR }(shift@or)}}sub nor{($xor,$or)=@_; if(($xOr!=0 )&&($nor!=0) ){while(($xOr!=$or)or($nor!=$xor)){ if($xOr<$or ){$xOr++}if( $nor<$xor){$nor++}if($xOr>$or){$xOr --}if($nor> $xor){$nor-- }$oar[$nor][$xOr]='*'}}$xOr=$or;$ nor=$ xor } sub oar{ore( shift);$ore=0;print"\e[2J\e[H\n" ;for(@oar){ for(@{$oar[$ ore]}){print"$oar[$ore][$orr]" ;$orr++ } $ ore++;$orr=0 ; # do not { or not # nor # { # oar # } # ore # { # or # oar # or } # ; ; $# or $# ; print "\n" } }# or # or # ore # nor # or # oar # or # ; # or { # } } # { # xor # nor # or # oar # } orr # ore # xor # nor #

It might not work on windows, but I can't test there anyhow.

And in case you can't tell, it's sort of supposed to be rotating :)


$/ = q#(\w)# ; sub sig { print scalar reverse join ' ', @_ } + sig map { s$\$/\$/$\$2\$1$g && $_ } split( ' ', ",erckha rlPe erthnoa stJu +" );

In reply to (Ab)using or by chargrill

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!
  • 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 the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (4)
    As of 2015-10-10 18:37 GMT
    Find Nodes?
      Voting Booth?

      Does Humor Belong in Programming?

      Results (257 votes), past polls