Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How to read from an URL ?

by ambs (Pilgrim)
on Mar 31, 2005 at 16:32 UTC ( [id://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 http://www.perlmonks.com|"; 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 http://www.perlmonks.com|"; 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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-23 09:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found