Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: How to read from an URL ?

by ambs (Pilgrim)
on Mar 31, 2005 at 16:32 UTC ( #443876=note: print w/replies, xml ) Need Help??

in reply to How to read from an URL ?

Ok, I know this is also LWP, but can teach something. If you have LWP installed with all its scripts, you have a GET command you can use in your shell, which outputs (dumps) the page content to STDOUT.

This means you can do

open MYHANDLE, "GET|"; while(<MYHANDLE>) { print $_; }
Also, you can use lynx for the same purpose (this is good because it has some options to remove tags, in case you want).
open MYHANDLE, "lynx -dump|"; while(<MYHANDLE>) { print $_; }
but, of course, use LWP. If you don't know where to start, look into LWP::Simple.

Alberto Simões

Replies are listed 'Best First'.
Re^2: How to read from an URL ?
by Ben Win Lue (Friar) on Apr 02, 2005 at 06:29 UTC
    Thank you, this helped a lot
Re^2: How to read from an URL ?
by Anonymous Monk on Apr 01, 2005 at 06:01 UTC

    I can get the Web page without Images

    How Can i get with image??

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://443876]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2021-10-27 01:43 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (91 votes). Check out past polls.