
KevinR
Veteran

Jul 2, 2007, 8:39 PM
Post #2 of 2
(17733 views)
|
Re: [rrhill] Extract a cookie value based on a variable?
[In reply to]
|
Can't Post
|
|
not sure what your question has to do with mod_perl, but your code looks like it should work OK. Try setting the value of $cookie_name to 'test' and see if it works. sub get_cookie { my $cookie_name = 'test'; my $r = shift; my %cookies = CGI::Cookie->parse($r->header_in('Cookie')); return $cookies{$cookie_name}; } -------------------------------------------------
|