grahm has asked for the wisdom of the Perl Monks concerning the following question:
when the "getThem" sub is called, only the "$rname" will print. all the others will not. I know that they're set in the cookie but am unable to pull them from the hash.&setThem($username,$logon,$hcolor,$sig); &getThem; print "rname=$rname logon=$logon hcolor=$hcolor sig=$sig\n"; sub setThem { # ---------------------------------- print "Set-Cookie:rname=$_[0]\n"; print "Set-Cookie:logon=$_[1]\n"; print "Set-Cookie:hcolor=$_[2]\n"; print "Set-Cookie:sig=$_[3]\n"; } sub getThem { # ---------------------------------- @cookies = split (/;/, $ENV{'HTTP_COOKIE'}); foreach $cookie (@cookies) { ($name, $value) = split (/=/, $cookie); $crumbs{$name} = $value; } $rname = $crumbs{'rname'}; $logon = $crumbs{'logon'}; $hcolor = $crumbs{'hcolor'}; $sig = $crumbs{'sig'}; }
Edit kudra, 2001-10-05 Changed title
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: from a newbie...
by dondelelcaro (Monk) on Oct 05, 2001 at 02:41 UTC | |
|
Supper time around the CGI campfire.
by boo_radley (Parson) on Oct 05, 2001 at 02:38 UTC |