in reply to [CGI] redirect after headers have been printed

You could use meta tags in the header:
<meta http-equiv="refresh" content="1; url=http://foo.bar.com/login.pl +">

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}