in reply to Re: How can my script retrieve the contents of an existing webpage?
in thread How can my script retrieve the contents of an existing webpage?

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Here's the correct syntax
by CheeseLord (Deacon) on Sep 03, 2001 at 01:40 UTC

    Sorry, but even that's untrue. vroom likely meant to enclose his code in backticks (`), not single quotes. That solution would've worked. But using system will only give you the return value from the system call instead of the output (although you'll likely get the output on your screen, it won't be stored in $webpage, which is the whole point here).

    What you want is qx, or backticks. They will return the output of the system call:

    $webpage = qx[ lynx -source http://blah.com ]; # Or... $webpage = `lynx -source http://blah.com`;

    Whichever fits your style and the situation best.

    His Royal Cheeziness