in reply to How I get cookie value

I'd think you can still use CGI.pm -- with the cookie() method to retreive the cookie:
my $q = new CGI; my $val = $q->cookie('param');
If you're not using CGI.pm (or can't for some reason), you can get the HTTP_COOKIE from the program's environment (unless ssi is clearing the environment out):
my $http_cookie = $ENV{'HTTP_COOKIE'}; $http_cookie =~ /^([^=]+)=(.*)$/; my($name,$val) = ($1,$2);
hope this helps...

Replies are listed 'Best First'.
Re: Re: How I get cookie value
by Anonymous Monk on Jun 15, 2001 at 20:06 UTC
    how does that piece of code know what cookie you are after. I tried it and it got a value of null.
RE: Re: How I get cookie value
by yschang (Initiate) on Feb 04, 2000 at 19:10 UTC
    Thanks. But as matter of fact I use CGI model did what you did. It didn't work. Also I try to use %ENV, also it didn't give me back anything as long as I use it in a SSI. Maybe just like you said netscape server SSI did something. But I am stuck here. Is there other way using perl to this job beside using server configuration. Thanks