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;