PilotinControl has asked for the wisdom of the Perl Monks concerning the following question:
Good Afternoon Monks!
Question: I would like to add a different color to each field in just a few lines of code. I have already accomplished this using several lines of code however the process needs to be repeated for each field. The code below just makes everything one color. The goal is to make each field a different color. Thanks in advanced!
my $format = "%-4s %-11s %-13s %-10s %-7s %0s\n"; print color 'bold green'; printf ($format, $field[0], $field[1], $field[2], $field[3], $field[4] +, $field[5]);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Print Color Format
by toolic (Bishop) on Jun 16, 2015 at 17:35 UTC | |
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 | |
|