in reply to I Appear To Be HTTP-Stupid

If your using the code at Re: HTML::Form problem on the page at http://home.earthlink.net/~marinersk/ then the reason you are getting the errors is because that snippet is trying to parse a form from within the page and that page contains no form.

What do you want to do with the page once you have got it?


Examine what is said, not who speaks.
1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
3) Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke.

Replies are listed 'Best First'.
Re: Re: I Appear To Be HTTP-Stupid
by marinersk (Priest) on Apr 15, 2003 at 22:21 UTC
    The HTML::Form snippet at Re: HTML::Form problem is being used verbatim, so it's not being told to go to the marinersk site.

    In theory, I'm trying to get the entire content of the web page via LWP. Update: Sorry, that wasn't a clear answer to your question. I'm basically trying to load all the data from a web page to be handled after I succeed at this "simple" task, and will be using the knowledge gained in order to write all manner of web-interface thingies. Mostly I was just wanting to see what I was going to get back.

    I thought the snippet would give me that.

    Am I out in left field and in need of a good read?

    Update: Corrected link.

      Please see What shortcuts can I use for linking to other information?, and also Writeup Formatting Tips.

      If you type [id://250682], you will get a link like Re: HTML::Form problem with the node title automagically retrieved for you and the link being relative to whichever hostname people are browsing from.

      (You can browse the site from perlmonks.com as well .org, with and without www., respectively. For the hostnames other than the one you're using your cookie does not apply, so following such a link appears to log you out.)

      Makeshifts last the longest.

        Thanks for the tips. I read those some time ago but didn't catch the significance of the internally-supplied linkage method. I arrogantly proceeded with HTML knowledge in hand, despite the warning that we're supposed to limit HTML in these messages -- I thought it was just for bulk reduction, not actual, operational, practical value.

        :-(

      If I understand what you're trying to do, give this a shot.
      use strict; use LWP::Simple; print get('http://home.earthlink.net/~marinersk/');

      That should give you your page. Of course you can save that as a stream and do whatever you want with it to your heart's content.

      Hope that helps!

      There is no emoticon for what I'm feeling now.

        Many thanks! Short, sweet, and to the point.

        Good candiate for a SNIPPET submission! It does what the other snippets did not -- provide direct access to the function needed.

        (Might want to change the URL in the call, though)

      Best guess. You have a downlevel or broken install. Try this. You'll need to swap "s for 's if your on *nix.

      perl -MLWP::Simple -e"print get(q[http://home.earthlink.net/~marinersk +/])"

      If that works, then you've a starting point, if it doesn't, consider verifying/upgrading/re-installing your perl install?


      Examine what is said, not who speaks.
      1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
      2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
      3) Any sufficiently advanced technology is indistinguishable from magic.
      Arthur C. Clarke.
        Well, improvement -- no output at all.