CGI has a flag that causes subsequent calls to header to be silently ignored.
$CGI::HEADERS_ONCE = 1;
However, it's only documented in the source, not in the pod. The alternative would be to make your own flag.
if ($cgi_header_already_printed++) { warn("Attempting to send second CGI while trying to ...\n"); } else { print CGI->header(); }
In reply to Re: Checking if a header has been printed
by ikegami
in thread Checking if a header has been printed
by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |