use HTTP::Cookies; my $agent = new LWP::UserAgent; my $co=new HTTP::Cookies(file=>'./stored.cookies',autosave=>1); $agent->cookie_jar($co);