in reply to LWP::Simple vs. ASP ?

The problem is that LWP::Simple uses a very simple hand-rolled HTTP client, which doesn't support cookies at all. You can tell LWP::Simple to use the full LWP implementation instead, by adding this line to your program (before the get):
$LWP::Simple::FULL_LWP = 1;
With that addition, your program works fine for me.

Replies are listed 'Best First'.
Re: Re: LWP::Simple emversus/em ASP ?
by George_Sherston (Vicar) on Dec 21, 2001 at 18:38 UTC
    Thanks - that helps - I would never have got there on my own. I now don't get a "Use of uninitialized value in print" warning. But aggravatingly I find that $html is empty. I'm completely puzzled by that. When you ran it, did you find that you got a page (albeit mutilated by broken links) when you printed $html? I just get a blank space - but only with that url; other urls give me a page.

    § George Sherston
      Is this running from a CGI script? I do get a page, and it's a frameset. That would look blank viewed in a web browser, because the the frames are specified using relative links.

      If you mean that the $html string is literally empty, try adding the line

      use LWP::Debug;
      before the get() call. You'll get a detailed trace of what LWP is doing, which should help you to diagnose the problem.
        A frameset is *exactly* what it was... now I know how to make it work. Thanks a zillion :)

        § George Sherston