Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Read web page Data

by thinker (Parson)
on Jul 20, 2003 at 08:26 UTC ( #276009=note: print w/replies, xml ) Need Help??

in reply to Read web page Data

Hi AM,

When you ask for, what you will get is the default page for that site, maybe index.html, or index.cgi, or whatever. It doesn't really matter what it is called, it is just an html page.

In which case, simply change $file = "/path/to/savefile.txt" to $file = "/path/to/savefile.html"

Of course, hardcoding the filename in there is of limited use, unless you want to rename the file after each run of the program

I hope this is what you were asking :-)



Replies are listed 'Best First'.
Re^2: Read web page Data
by Anonymous Monk on Jun 12, 2013 at 06:50 UTC
    Hi Monks, I also used code given here and I used following code as well but I did not get response: use strict; use warnings; use LWP::Simple; my $url = ""; getprint($url); Windows7/perl 5.16.3 Can anyone please help me out here to extract data from any webpage. Thanks.
Re: Re: Read web page Data
by Anonymous Monk on Jul 20, 2003 at 12:05 UTC
    This is wht I want to ask : I want to code a perl script as follows . Open Netscape and type a url . This url can be anything like or or any url . Now I want my perl script to read data for this url . Suppose I type the url like then the perl script must be able to read data of that page . But if I change the url to or any other then it should read that particular web page data. That means as I keep changing the url in Netscape the perl script should continue to read data for that url page and save it somewhere . Normally to retrieve web page data I use : $url = " But my problem comes when I change the url in Netscape I am unable to change the url for the $url. Can u suggest me how can I achieve it .
      Look at a combination solution of autoit and perl. autoit can read your freshly type url and call your perl script with that url. It might be a bit complicated but will certainly work out if you put in the effort.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://276009]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2017-03-28 15:11 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (333 votes). Check out past polls.