in reply to How do i save an image with www::mechanize
Grab the html:
perform a regex on $r to extract the url of the image, and then use either use Image::Magick or GD to save the image on your server.my $mech = WWW::Mechanize->new(); $mech->get($add); my $r = $mech->content;
$r =~ m#regex(.*)# my $imgurl = $1; my ($image, $x); my $photofile ="photo.jpg; $image = Image::Magick->new; $x = $image->Read($imgurl); $x = $image->Write("$photofile");
In Section
Seekers of Perl Wisdom