require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('url_to_some_picture.jpg'); ## Either use :raw on the open open(outfile, '>:raw', 'file_path_name'); ### You should check for success! ## Or use bimode binmode outfile; if ($response->is_success) { print outfile $response->content; } else { die $response->status_line; }