in reply to Adding My Own Cookie Value ?

Some details are missing, but if your program doesn't die, then it appears that the save and load are at least "working" in some way. Looking at the source of HTTP::Cookies shows those calls would indeed die if something were to go wrong with I/O.

It looks like you aren't passing the correct parameters to set_cookie. According to the docs, it takes $version, $key, $val, $path, $domain, $port, $path_spec, $secure, $maxage, $discard, \%rest, so in your case, $domain is going to be undef. When the module assigns the cookie to its hash, it's going to do something funky: $self->{COOKIES}{$domain}{$path}{$key} = \@array;

Try this:

my $version = 0; my $key="INFO"; my $val="36D93C2F9E23D30EBD4B1F1A6D6E6871A5FA7184058AD675"; my $path = "/"; my $domain="foo.com"; my $maxage = 100000; $cookie_jar->set_cookie( $version, $key, $val, $path, $domain, undef, undef, undef, $maxage);