in reply to Sending a cookie info without a cookie

Not with LWP::Simple. You'll want to use the full object-oriented version: LWP::UserAgent
  • Comment on Re: Sending a cookie info without a cookie

Replies are listed 'Best First'.
RE: Re: Sending a cookie info without a cookie
by merlyn (Sage) on Sep 08, 2000 at 04:56 UTC
    Well, you can still use LWP::Simple, but you have to do just about everything the full-blown version uses. From the docs:
    The module will also export the LWP::UserAgent object as `$ua' if you ask for it explicitly.
    So that means you can do something like (untested!):
    use LWP::Simple qw(get $ua); use HTTP::Cookies; $jar = HTTP::Cookies->new; ... do other things with $jar ... $ua->cookie_jar($jar); ... $result = get $url;
    But there's not much different there from just using the real LWP::UserAgent.

    -- Randal L. Schwartz, Perl hacker