On Fri, 8 Oct 2004, Nicolay A. Vasiliev wrote:
The standard library for writing web clients -- which, in this context,
your web server is acting as -- is LWP. The LWP::Simple module may be
the easiest way to do this:
$image = get("http://www.sample.url/images/sample.jpg");
die "Couldn't get it!" unless defined $image;
At that point, just write the contents of $image to a file.
See the LWP::Simple perldoc for more info, or the LWP docs:
Or see the e-book _Web Client Programming with Perl_ by Clinton Wong:
It's a bit old, but still covers the basics.