in reply to Header Visible In CGI output after cookie header is sent

No one's mentioned this yet, so I will. In CGI.pm there's a special $HEADERS_ONCE flag that, when set, will suppress duplicate prints of the HTTP header information. In short, it does exactly what you want. Just put:
#!/usr/bin/perl use CGI qw(:standard); $CGI::HEADERS_ONCE =1;
at the top of your program and you can call header() as many times as you like and only the first print will make it to the browser. Easy cheesy. (No, this is not in the CGI.pm documentation. :-D)

Gary Blackburn
Trained Killer