Gossamer Forum
Home : General : Perl Programming :

cookie problem

Quote Reply
cookie problem
hey im new to perl and i'm trying to set a cookie on one page and retrieve it in another. he problem is that i get an error. "Can't call method "value" on an undefined value at...".

# set cookie
$cookie = $query->cookie(-name=>'session_id', -value=>"m$member_id\s$count", -expires=>'+1h', -secure=>1);

# fetch existing cookies
%cookies = fetch CGI::Cookie;
$session_cookie = $cookies{'session_id'}->value;

obviously im doing it wrong, can anyone tell me how to do it?
thanks Pedge
Subject Author Views Date
Thread cookie problem pedge 3208 Dec 2, 2002, 7:25 AM
Thread Re: [pedge] cookie problem
Paul 3100 Dec 2, 2002, 7:32 AM
Thread Re: [Paul] cookie problem
pedge 3102 Dec 2, 2002, 7:38 AM
Post Re: [pedge] cookie problem
Paul 3089 Dec 2, 2002, 7:59 AM