in reply to Re: I Appear To Be HTTP-Stupid
in thread I Appear To Be HTTP-Stupid

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.

Replies are listed 'Best First'.
Linking on Perlmonks
by Aristotle (Chancellor) on Apr 15, 2003 at 22:29 UTC

    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.

      :-(

Re: Re: Re: I Appear To Be HTTP-Stupid
by Popcorn Dave (Abbot) on Apr 15, 2003 at 22:54 UTC
    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)

Re: Re: Re: I Appear To Be HTTP-Stupid
by BrowserUk (Patriarch) on Apr 15, 2003 at 22:36 UTC

    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.

        My best guess is that you (or your isp) are using a proxy. Read the section of the pod for LWP::UserAgent on the $ua->proxy(...) method.


        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.