in reply to Re^2: save image on web
in thread save image on web
You never gave us the actual URL of the image you are trying to download so we are leading you blindly. This script works for me.
use strict; use WWW::Mechanize; my $local_image = './google.gif'; my $url = 'http://www.google.com/images/firefox/google.gif'; my $mech = WWW::Mechanize->new(); $mech->get( $url ); open (OUT, ">$local_image"); binmode OUT; # Windows only print OUT $mech->content;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: save image on web
by kcella (Beadle) on Dec 22, 2004 at 00:51 UTC |
In Section
Seekers of Perl Wisdom