use LWP::Simple; my $url = "http://192.168.0.214/dbconnect/rabbithole/instructions.txt"; # If we get the header, the image file exists if (!head($url)) { warn "sorry, $url doesn't exist\n"; } else { # it exists, so get it and store it getstore($url,"instructions.txt") or warn "can't get image: $!"; # Print a progress message print "$url successfully stored\n"; }