#!/usr/bin/perl # # .bitchxrc: # # /alias annoy exec -out ~/.BitchX/annoy.pl # use Term::ANSIColor; select STDOUT; $string = ""; @stats = (); $char_counter = 0; @colors = ( "0", "4", "8", "9", "11", "12", "13"); @modes = ("\002", # bold "\026", # reverse "\037", # underline "\017"); # normal foreach (@ARGV) { $item .= $_ . " "; } $item =~ s/\ *$//g; while ($char_counter < length($item)) { $fg += int(rand(2)); $fg = 0 if ($fg > $#colors); $bg = $#colors - $fg; $fg++ if (($bg == $fg) && ($bg < ($#colors-1))); $string .= $modes[(int(rand($#modes)))]; $string .= "\003"; $string .= sprintf("%02d,%02d", $colors[$fg], $colors[$bg]); $char = ((substr($item, $char_counter, 1))); $string .= (($char eq ",") ? ",," : $char); $string .= "\017"; $char_counter++; $fg++; } print "$string\n";