in reply to Print Color Format
use warnings; use strict; use Term::ANSIColor; my @field = 1..6; my @fmts = qw(%-4s %-11s %-13s %-10s %-7s %0s); my @cols = qw(green red green red green red); # Fill in your colors he +re for my $i (0 .. $#field) { print color($cols[$i]); printf $fmts[$i], $field[$i]; } print color('reset'), "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Print Color Format
by PilotinControl (Pilgrim) on Jun 16, 2015 at 18:02 UTC | |
by toolic (Bishop) on Jun 16, 2015 at 18:10 UTC | |
by PilotinControl (Pilgrim) on Jun 16, 2015 at 18:17 UTC | |
by toolic (Bishop) on Jun 16, 2015 at 18:24 UTC | |
by PilotinControl (Pilgrim) on Jun 16, 2015 at 18:37 UTC |