Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Fun with ANSI

by phroggy (Monk)
on Aug 10, 2005 at 00:32 UTC ( [id://482472]=obfuscated: print w/replies, xml ) Need Help??

#!/usr/bin/perl use strict; use warnings; my $q='XyLEoNgGmGjkrhPrrJtctlhe,auesenaoOmCnEfc'; for(sort split''=>substr$q,11,22,'Kfkz'){my$d=ord substr$q,0,1,'';print"\e[".(ord uc chr $d^64).chr (($d&32)/32+67)if($d<122);print}print"\n"#phroggy
This might work on Windows if you load ANSI.SYS...

Replies are listed 'Best First'.
Re: Fun with ANSI
by zentara (Archbishop) on Aug 10, 2005 at 11:48 UTC
    I'm not getting any ansi color from this on linux.

    I'm not really a human, but I play one on earth. flash japh
      Pipe the output through cat -v and it should be clear what's happening. You're not supposed to see any special colours.
      It uses ANSI escape sequences to control cursor movement, not to display different colors. Change ;print}print to ;print;sleep 1}print to see it more clearly.
      perl -e '($,,@_)=("er",",\n","l Hack"," P","Just anoth"); print reverse @_;'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://482472]
Approved by Tanalis
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-26 08:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found