I'm kind of new, so I looked up the cookbook
but don't understand the values
What are $version? $key? $val? $discard?
can someone give an example?
Thanks for your kind help...:)
$cookie_jar->set_cookie($version, $key, $val, $path, $domain, $port, $path_spec, $secure, $maxage, $discard, \%rest)
$version isn't well documented. You probably just want to use
1. If $discard is true, the cookie will be deleted instead of set.
If you're working on a scraper sort of thing, you should set the values in set_cookie() the same way that the site does when it issues the cookie. You can snoop on the Set-Cookie headers either with LWP and some coding, or you could do something like log in with FireFox and view the reponse headers with the WebDev extension.