in reply to ascii colors from text file
use strict; use warnings; my %colours = map { $_->[0] => map { my $str = $_; $str =~ s{\\\\(\d{3})}{chr(oct $1)}e; $str } $_->[1] } map { chomp; [ split m{=} ] } <DATA>; print qq{Black then$colours{color2} red then$colours{color1} black.\n} +; __END__ color1=\\033[0;30m color2=\\033[0;31m
I hope this is of use.
Cheers,
JohnGG
|
|---|