in reply to 'Premature end of script headers' error

Well, when I tried running it from the command line, I got this error (with -w):

a.cgi: Name "main::labels" used only once: possible typo at ./a.cgi li +ne 163.

This came out before the Content-Type: text/html line. My guess is that you are trying to use \%labels and haven't defined the hash.

Hope this helps...

--
D a d d i o