in reply to Re^2: CGI error: "Invalid header value contains a newline not followed by whitespace"
in thread CGI error: "Invalid header value contains a newline not followed by whitespace"

You only print headers once, either use redirect, or use header, not both

print $q->header( -status => '302 Found', -uri => 'http://localhost/', -cookie => [ $set_session $set_username ], ); __END__
  • Comment on Re^3: CGI error: "Invalid header value contains a newline not followed by whitespace"
  • Download Code

Replies are listed 'Best First'.
Re^4: CGI error: "Invalid header value contains a newline not followed by whitespace"
by MyMonkName (Acolyte) on Feb 04, 2012 at 21:06 UTC
    But this doesn't actually redirect, which is a requirement for the particular login script where I first noticed the error on my machine.

      But this doesn't actually redirect, which is a requirement for the particular login script where I first noticed the error on my machine.

      Sure it does