--Psuedo Code -- #!/usr/bin/perl -wT use strict; use CGI; my $q=CGI->new(); $|=1; print $q->header(); # print all your other HTML stuff for the header type thingy, only complete tables my $query=$dbh->prepare($your_query) or die("Couldn't prepare: ".$dbh->errstr()); print "Still Processing"; $query->execute() or die("Couldn't execute: ".$dbh->errstr()); print $query_results_and_bottom_of_page;