Well it appears I hve worked this out. I think the problem was th "mystery" cookie that had no name and blew the routine up. Still don't know where it comes from but appears each time I run.
sub GetUserSessionCookie { warn("Entered GetUserSessionCookie Sessionname: '$sessionname'"); + my $sid; my $sessionname = 'CGISESSID'; # # fetch existing cookies my %cookies = CGI::Cookie->fetch; # warn Dumper \%cookies; while ( my ($sessName, $sessId) = each(%cookies) ) { # Dumper($sessId); if ($sessName eq $sessionname) { $sid = $sessId; } } # $sid = '12ba7ce0cfeeae8e8a934af6724910e9'; # $sid = '1492'; # $sid = 0; return $sid; }
Whew. Thanks all.
In reply to Re^3: Cookie->fetch problem
by tultalk
in thread Cookie->fetch problem
by tultalk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |