doctor_moron has asked for the wisdom of the Perl Monks concerning the following question:
Cookies saved in lwpcookies.txt, is that true ?use LWP::UserAgent; use HTTP::Cookies; use HTTP::Request::Common; use constant MONK_LOG=> 'http://www.perlmonks.org/index.pl'; $ua=LWP::UserAgent->new; $newagent= 'loginTOmonks/1.0 (' . $ua->agent .')'; $ua->agent($newagent); $ua->cookie_jar(HTTP::Cookies->new(file=>"lwpcookies.txt",autosave=>1) +); #$ua->cookie_jar(HTTP::Cookies->new()); $res=POST(MONK_LOG, Content=> [op=>'login', user=>'doctor_moron', pass +wd=>'mypasswd']); $res= $ua->request($res); print $res->status_line, "\n"; #the way i see cookies print $ua->cookie_jar->as_string();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: another cookies question
by ikegami (Patriarch) on Sep 21, 2004 at 21:40 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |