in reply to Re: Cookie question ....
in thread Cookie question ....

Caedes,

Thanks for your response.

This is all the code in the beginning of my script-
#!/usr/bin/perl my $yySetCookies1 = cookie(-name => "test", -value => "test", -path => "/", -expires => ""); print header(-status=>"200 OK", -cookie=> $yySetCookies1); use CGI qw(:standard); # Must be used to get the param() func +tion #use CGI; use CGI::Carp (fatalsToBrowser); #use CGI::Cookie; use strict; use OLE; use Net::SMTP; # Yes, this will work on windows. use MIME::Base64;


I'm using CGI.

ANy ideas?

Thanks, SP

Replies are listed 'Best First'.
Re: Re: Re: Cookie question ....
by caedes (Pilgrim) on Feb 27, 2003 at 08:59 UTC
    Nothing there seems to be the cause of your problem although you would do well to clean up your code just a bit. You have a bareword "fatalsToBrowser" on the 6th line. I suggest something like:

    #!/usr/bin/perl -w use strict; use CGI::Carp qw(fatalsToBrowser); use CGI qw(:standard); my $yySetCookies1 = cookie( -name => "test", -value => "test", -path => "/", -expires => "" ); print header( -status=>"200 OK", -cookie=> $yySetCookies1 );

    -caedes

      Caedes,
      Thanks for your reply. Yeah I tried all that and for some reason it still didn't work. In the end, I figure it and got it working with this (messy, but I think I can make a function out of it now):
      print "HTTP/1.0 200 OK\nCache-Control: no-cache, must-revalidate\nPrag +ma: no-cache\nSet-Cookie: test=test; path=/; expires=Wed, 29 Mar 2005 + 13:49:23 -0500\nContent-Encoding: \nContent-Type: text/html; charset +=\n\n";

      Thanks for your help. SP