http://qs321.pair.com?node_id=571625


in reply to Downloading and saving images.

While "the right answer" has already been given, you also might consider switching to LWP::Simple, for it makes your code a whole lot shorter ;)

use strict; use LWP::Simple qw/getstore/; getstore("url_to_some_picture.jpg", "file_path_name");
--
b10m

All code is usually tested, but rarely trusted.