Eugene has asked for the wisdom of the Perl Monks concerning the following question:

I am grabbing a page for parsing like
use LWP::Simple; $page = get 'http://www.bla.com';

problem is that I won't get to the page unless a cookie is set after I login. I am being redirected to the login page every time I go to the url. Is it possible to somehow send a cookie content to the server without having a real cookie?

Replies are listed 'Best First'.
Re: Sending a cookie info without a cookie
by Fastolfe (Vicar) on Sep 08, 2000 at 01:57 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