in reply to Re^2: Perl CGI Cookies "Content-Type:text/html" showing at top of html.
in thread Perl CGI Cookies "Content-Type:text/html" showing at top of html.

I have fixed this after all your help thanks alot people !!
print "Content-type: text/html\n"; print header(-cookie=>$cookie); print "\n";
Who would have known it would be so simple! Thanks L
  • Comment on Re^3: Perl CGI Cookies "Content-Type:text/html" showing at top of html.
  • Download Code

Replies are listed 'Best First'.
Re^4: Perl CGI Cookies "Content-Type:text/html" showing at top of html.
by Anonymous Monk on Aug 22, 2011 at 10:20 UTC

    I have fixed this after all your help thanks alot people !!

    print "Content-type: text/html\n"; print header(-cookie=>$cookie); print "\n";
    Who would have known it would be so simple! Thanks L

    Its actually much simpler

    use CGI qw/ :standard /; my @futz = ( -cookie=> cookie(1..9), ); print header( @futz ); __END__ Set-Cookie: 1=2; domain=4; path=3; expires=Thu, 01-Jan-1970 00:00:06 G +MT; secure; HttpOnly Date: Mon, 22 Aug 2011 10:18:59 GMT Content-Type: text/html; charset=ISO-8859-1