use warnings; use strict; use Term::ANSIColor qw(colored); my $c = 0; my $fmt = '%-7s %-22s %-18s %-35s %-15s %-16s %-30s'; printf "$fmt\n", qw(ID MAC IP Manufacturer Authorized Acknowledged Notes); for (1..4) { my @row = 1..7; my ($id,$mac,$ip,$man,$auth,$ack,$notes) = @row; my $str = sprintf $fmt, $id,$mac,$ip,$man,$auth,$ack,$notes; if ($c == 1) { print colored($str, 'bold blue on_grey10'), "\n"; $c--; } else{ print "$str\n"; $c++; } }