#! /usr/bin/perl -w use strict; use CGI; my $q = new CGI; my %tab = ( abc => [4, 20], def => [9, 20000], ghi => [16, 200000] ); print $q->table( {-border=>"1"}, $q->TR([ map { $q->td( $_ ) . $q->td( $tab{$_}->[0] ) } sort keys %tab ]) );