You should not print HTTP response header with
$q->header() if you are going to do redirect with
$q->redirect.
Status: 302 Found Uri: Location: Content-type: text/html is not an error - it is correct HTTP header your script should issue to do redirect. You see it only because your script already issued HTTP header with
$q->header(). (Well almost correct HTTP header - after
Location: there should be URL where script redirects)
BTW you don't need require ("cgi-lib.pl"); if you are using CGI.pm.
--
Ilya Martynov
(http://martynov.org/)