Erik A wrote:
I use LWP and HTTP::Cookies to retrieve web pages and set cookies. It all works fine but now I want to add cookies manually also.
I have played around with this without success. I use this short code to set a cookie of my choice:
$cookie_jar = HTTP::Cookies->new(File => "./lwpcookies.txt", autosave => 1);
$cookie_jar->set_cookie(1,'key','value','/','domain.com','','','',1000000,'');
I get no error message and no cookie in my cookie file. What do I do wrong?
Try undefing the port parameter (shouldn't be coded that explicitly):
use HTTP::Cookies; my $cookie_jar = HTTP::Cookies->new(File => "./lwpcookies.txt", autosave => 1); $cookie_jar->set_cookie(1, 'key', 'value', '/', 'domain.com', undef, 0, 0, 1000000, 0); __END__ -- ,-/- __ _ _ $Bill Luebkert ICQ=162126130 (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl) -/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/ _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
