Hi,

I am testing a simple script to grab cookie. however
there is only one line as "#LWP-Cookies-1.0" in the
saved file. what's wrong?

here is the script

use LWP::UserAgent;
use HTTP::Cookies;
$cookie = new HTTP::Cookies;
$ua = new LWP::UserAgent;
$ua->agent("Mozilla/4.7");

$ua->cookie_jar(HTTP::Cookies->new(file=>'t.txt',autosave=>1));

$base_url='http://fwcgames.yahoo.com/cocacola';
my $response=$ua->request(new HTTP::Request 'GET' =>
$base_url);
unless ( $response->is_success ) {
       print "Error: " . $response->status_line .
"\n";
}

thanks!

James

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

Reply via email to