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
In reply to Re: ascii colors from text file
by johngg
in thread ascii colors from text file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |