in reply to FORMATting

You should be able to use format just fine in a CGI script. Just print out the Content-Type header before you start printing out the HTML page as usual. Call the format STDOUT, then you can just use the write function to print out the data. Something like this:
#!/usr/local/bin/perl -w use strict; use vars qw/$name $phone/; use CGI; my $query = new CGI; print $query->header; format STDOUT = @<<<<<<<<<<< @|||||||||||||| $name, $phone . my %phones = ( "Baz" => "1-293-593-2529", "Foo Bar" => "1-392-592-0382" ); print "<pre>\n"; print "Phone Numbers:\n"; for $name (keys %phones) { $phone = $phones{$name}; write; } print "</pre>\n";
You'll want to mess with it a bit, but that's the general idea.