use strict; use warnings; use CGI qw/:standard/; my %hosts = ('a' .. 'z'); cgiOut (); sub cgiOut { my $q = new CGI; print $q->header( "text/plain" ), $q->start_html( -title=>"Apache Stats for \$hostname", -bgcolor=>"#ffffff"), $q->h2( "Apache Stats for \$hostname" ), $q->hr, $q->table( { -border=>"1", -width=>"100%" }, $q->Tr({}, [map { td([$_, $hosts{$_}]) } sort keys %hosts])), $q->end_html; }