On Tue, 31 Aug 2004, Chris Devers wrote:
On Tue, 31 Aug 2004, Tim Musson wrote:
Hey all, I want to grab a config file from a web server. Basically I need
to pull a ServerList.csv from a web server so I don't have to distribute it
all over.
Is this a Perl question?
Duh, yes, it is -- you said "grab", not "serve". Ignore the last mail.
The simplest way to do this is in Perl with LWP:
use LWP::Simple;
$content = get($URL);
Or to be more robust about it:
use LWP::Simple;
unless (defined ($content = get $URL)) {
die "could not get $URL\n";
}
Make sense?
--
Chris Devers [EMAIL PROTECTED]
http://devers.homeip.net:8080/blog/
np: 'It's Not Easy Being Green (lo-fi midi version)'
by Kermit
from 'The Muppet Movie Soundtrack'
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>