Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

How to download a file

by salibas (Initiate)
on Feb 26, 2002 at 12:13 UTC ( [id://147534]=perlquestion: print w/replies, xml ) Need Help??

salibas has asked for the wisdom of the Perl Monks concerning the following question:

I need a perl script that helps me download MP3 and PDF files from my site without opening it.

Replies are listed 'Best First'.
Re: How to download a file
by projekt21 (Friar) on Feb 26, 2002 at 12:24 UTC

    Have a look at LWP::Simple to start with.

    use LWP::Simple; my $url = "http://www.foo.com/mp3s/foo.mp3"; my $file = "/path/to/local/file/foo.mp3"; getstore($url, $file);
    Plus some error handling and "use strict;" and maybe some more features and you'll be lucky.

    alex pleiner <alex@zeitform.de>
    zeitform Internet Dienste

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-19 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found