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");