CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Frequently Asked Questions:
How do I fetch an HTML page on the web?



Dec 12, 2000, 2:28 PM

Post #1 of 1 (8653 views)
How do I fetch an HTML page on the web? Can't Post

If you have the text based browser installed on your system called "lynx", you can use that like so,

$url = "";
$html_code = `lynx -source $url`;

Which runs a system command using those back ticks ``.

The other way, which tends to be used more often, is by using the LWP set of modules, the simplest way is by using LWP::Simple;

use LWP::Simple;
$the_html = get("");

# do something with $the_html



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives