#!/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 (Cardinal) 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 @_;'