Solved

using Perl to Retrieve a Html File?

Posted on 2001-06-20
4
212 Views
Last Modified: 2012-06-27
I would like to know how to write a Perl program to
retrieve a web page from an URL and display it
in Dos-Prompt(Windows) or in Cosole Mode(UNix)?

for example, display http://www.yahoo.com

thanks!
0
Comment
Question by:McCoffee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
shlomoy earned 120 total points
ID: 6209957
use LWP::Simple qw(getprint);
getprint($url);
0
 
LVL 5

Expert Comment

by:Sapa
ID: 6209995
It's already written. Look for GET script installed with libwww-perl,
and lwp-request in ActivePerl distribution.

- Sapa
0
 

Expert Comment

by:georgedb
ID: 6210199
There is also a PERL script that has been around I think at least since 1995, as I used it and still got it (somewhere). From memory:

It was written by a Jack Lund, based on HGET from Oscar Nierstrasz, and the script is called "url_get". I'm sure you can find it somewhere on the Internet.
0
 
LVL 8

Expert Comment

by:shlomoy
ID: 6213082
C?!
Was it that a lowsy answer? :-)

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question