freelanceprogrammers.org Forum Index » Perl

Automated download of remote files


View user's profile Post To page top
conundramatic Posted: Sat Feb 23, 2002 1:07 am


Joined: 23 Feb 2002

Posts: 1
Automated download of remote files
Is there anyway I can automate the download of a
remote file in perl? Such as the to simulate the
following:<br>cp some_remote_http_file
local_file_or_filehandle<br><br>So the script would read in a URL and download
the
file to its local disk.
Reply with quote
Send private message
View user's profile Post To page top
The_Foundationer Posted: Sat Feb 23, 2002 2:04 am


Joined: 22 Feb 2002

Posts: 2
Automated download of remote files
The easiest way it to use IO::Socket to make an INET connection to the remote
server, then send an HTTP GET to get the file, then just put the output from the
Socket handle into an open File handle.
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help