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");
In Section
Seekers of Perl Wisdom