use Image::Grab; my $url ='http://www.example.com/FileName.html' my $pic = Image::Grab->new(SEARCH_URL=>$url, REGEXP =>'.*\.jpg'); $pic->grab; my $File = basename($url); $File =~ s/html/jpg/i; # Now to save the image to disk open(IMAGE, ">$File") || die"$File: $!"; binmode IMAGE; # for MSDOS derivations. print IMAGE $pic->image; close IMAGE;
From novice to tech pro — start learning today.