in reply to How can I get images from urls - Getting 443 and 500 errors

Version 5.64 of LWP is over 13 years old. Which version are you actually using? And why use both LWP and LWP::Simple? This example works fine for me (using LWP 6.02):

use strict; use warnings; use LWP; my $sku = 49176; my $url = "https://mms.image.mckesson.com/CumulusWeb/Images/High_Res/$ +sku.jpg"; my $ua = LWP::UserAgent->new; my $resp = $ua->get($url); print $resp->code;

Replies are listed 'Best First'.
Re^2: How can I get images from urls - Getting 443 and 500 errors
by kevyt (Scribe) on Mar 20, 2015 at 18:37 UTC
    I thought I replied but I don't see it. This worked on Linux. Thank you.
    use strict; use warnings; use LWP; use LWP::Simple; my $sku = 49176; my $url = "https://mms.image.mckesson.com/CumulusWeb/Images/High_Res/$ +sku.jpg"; my $ua = LWP::UserAgent->new; my $resp = $ua->get($url); print $resp->code; my $path = '../data_files/' .$sku . '.jpg'; getstore($url, $path ) or die "Can't download: $@\n"
Re^2: How can I get images from urls - Getting 443 and 500 errors
by kevyt (Scribe) on Mar 20, 2015 at 17:54 UTC
    I have not used perl for a while and I used code that I found online for getting images. I'm using windows and I'm behind a firewall. I'll try your code from Linux without the firewall to see if that makes a difference. Thanks.