App-Bin4TSV
view release on metacpan or search on metacpan
scripts/resistorcc view on Meta::CPAN
use warnings ;
use Encode qw[ encode_utf8 decode_utf8 ];
use Term::ANSIColor qw[ :constants color ] ;
$Term::ANSIColor::AUTORESET = 1 ;
use Getopt::Std ;
getopts '' , \my %o ;
my @givecolor = map { color ( $_ ) }
(
'dark white' , 'faint bold red', # 'dark on_bright_red black', # 0 1
'red ', 'bright_red' , 'yellow' , # 2 3 4
'green', 'bright_blue', 'bold magenta', # 5 6 7
'white', 'bold bright_white' # 8 9
) ;
while ( <> ) {
$_ = decode_utf8 $_ ;
my @cha = split /([0-9]|\e\[[\d;]*m)/, $_ , -1 ; # "\e" = "\x1b"
#my @cha = split /([0-9])/, $_ , -1 ;
my $prevnum = 0 ; # ç´åã®æåãæ°åã ã£ãã©ããã®ãã©ã°
for ( @cha ) {
if ( m/^[0-9]$/ ) {
( run in 1.228 second using v1.01-cache-2.11-cpan-5a3173703d6 )