opening a URL

They have: 3 posts

Joined: Oct 2000

Hi, can anyone help?

Can anyone tell me if there's a simple way to open URL's for input without the use of LWP or other modules??

Phil

They have: 568 posts

Joined: Nov 1999

Define "for input"

They have: 3 posts

Joined: Oct 2000

I mean, to read the contents of a URL into perl.

...any advice?

They have: 568 posts

Joined: Nov 1999

#!/usr/bin/perl
print "Content-type: text/html\n\n";
use LWP::Simple;

$url = "http://www.slashdot.org";

$url_contents = get($url);

print $url_contents;
'

They have: 122 posts

Joined: Jun 2000

Quote: without the use of LWP

I supposed you could use wget, lynx or something other program, or possibly just connect via sockets and do GET $webpage HTTP/1.0.

Rob Radez
OSInvestor.com

They have: 3 posts

Joined: Oct 2000

Cheers guys,

hadn't heard of wget before, but it seems to do the job.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.