• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 309
  • Last Modified:

Download Images using perl

Hi all,
      I'm kind of familiar with perl but not yet gone deep into it... How to download images from a website. can LWP::UserAgent be used for this or is there a separate module for the purpose of images. If LWP::Useragent can be used, how to use it for getting images? 'coz I tried using it like for normal text but it did not work out.  ur help will be much appreciated. Thanx
4 Solutions
Yes, LWP::UserAgent can download any type of web content. Perhaps if you showed us what you tried, we could suggest how to make it right?
Depending on what you are trying to do, LWP::Simple can download images as well.
christopher sagayamCommented:
use LWP::Simple;

my $url = 'http://example.com/url/of/image.png';

getstore($url, 'image.png');
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now