#!/usr/bin/perl use strict; use warnings; use CGI; use HTML::Table; my $cgi = CGI->new; print $cgi->header, $cgi->start_html; my $t = HTML::Table->new( [map {[split /\s+/]} split /\n/, qx/df -h/] ); $t->setRowStyle($_, $_ % 2 == 0 ? 'background-color: #ddd;' : 'background-color: #6d6;' ) for (1..$t->getTableRows); $t->setRowStyle(1, 'background-color: Ć color: #fff;'); print $t, $cgi->end_html;