http://www.perlmonks.org?node_id=147534

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