Hi As far as I can see your code is the same as that which I am using... which works
I have observed one thing not all cookies are saved in the file, only permanent cookies are saved, session cookies are not saved. So if the cookies you are expecting to see are session based then you will not see them in the file. I hope that this helps.. I use LWP::UserAgent quite a bit and find that it works well. Helen -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Mikzu kinos Sent: 02 November 2003 21:15 To: [EMAIL PROTECTED] Subject: lwp cookies Anything you can see wrong with this? I NEVER see anything in cookies.txt... #!/usr/bin/perl -W use LWP::UserAgent; use HTTP::Cookies; use HTTP::Request; use strict; my $ua = LWP::UserAgent->new; $ua->cookie_jar(HTTP::Cookies->new(file => 'cookies.txt', autosave => 1)); my $res = $ua->request(HTTP::Request->new(GET => 'http://www.test.com')); my $req = HTTP::Request->new(POST => ''); $req->content_type('application/x-www-form-urlencoded'); $req->content('ulogin=x&upassword=x'); $res = $ua->request($req); open my $file, ">test.html" or die "Couldn't open test.html: $!"; print $file $res->as_string; close $file; Do you Yahoo!? Exclusive Video Premiere - Britney Spears _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
