B
bigDWK
From the HTTP::Cookies man page it shows this function
I believe I have the most current version of HTTP::Cookies (cpan tells
me I do).
$cookie_jar->scan( \&callback );
The argument is a subroutine that will be invoked for
each cookie stored in the $cookie_jar. The subroutine
will be invoked with the following arguments:
0 version
1 key
2 val
3 path
4 domain
5 port
6 path_spec
7 secure
8 expires
9 discard
10 hash
I can retrieve all this info, but i'm having problems getting the
values out of the hash that's returned. Here's my code
##########Code starts here, $c_jar has been filled with stuff from a
request###
$c_jar->scan(\&cookieCB);
sub cookieCB
{
my($ver, $keyC, $valC, $path, $domain, $port, $path_spec,
$secure, $maxage, $discard, %attr) = @_;
#then i do stuff with the values returned, all of these are
filled with values
#now to the hash
foreach my $key (keys(%attr))
{
print $key."\n";
}
}
##############End of Code###############3
The above code prints "HASH(0x[SomeHexNumber])" instead of the value
of the key. Of cource if I try and reference the value with this key
I get a blank value every time. Any ideas?
I believe I have the most current version of HTTP::Cookies (cpan tells
me I do).
$cookie_jar->scan( \&callback );
The argument is a subroutine that will be invoked for
each cookie stored in the $cookie_jar. The subroutine
will be invoked with the following arguments:
0 version
1 key
2 val
3 path
4 domain
5 port
6 path_spec
7 secure
8 expires
9 discard
10 hash
I can retrieve all this info, but i'm having problems getting the
values out of the hash that's returned. Here's my code
##########Code starts here, $c_jar has been filled with stuff from a
request###
$c_jar->scan(\&cookieCB);
sub cookieCB
{
my($ver, $keyC, $valC, $path, $domain, $port, $path_spec,
$secure, $maxage, $discard, %attr) = @_;
#then i do stuff with the values returned, all of these are
filled with values
#now to the hash
foreach my $key (keys(%attr))
{
print $key."\n";
}
}
##############End of Code###############3
The above code prints "HASH(0x[SomeHexNumber])" instead of the value
of the key. Of cource if I try and reference the value with this key
I get a blank value every time. Any ideas?