use strict; use warnings; use diagnostics; use WWW::Mechanize; $|=1; print "Init\n"; if($@){print "\n\$@ = $@\n"; $@=0;} if($!){print "\n\$! = $!\n"; $!=0;} print "Mech\n"; my $mech = WWW::Mechanize->new( autocheck => 1 ); if($@){print "\n\$@ = $@\n"; $@=0;} if($!){print "\n\$! = $!\n"; $!=0;} print "Get\n"; #$mech->get('https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png', ':content_file' => 'z.png'); #$mech->get('https://upload.wikimedia.org/wikipedia/commons/thumb/a/af/White_pearl_necklace.jpg/220px-White_pearl_necklace.jpg', ':content_file' => 'zzz.jpg'); #$mech->get('https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Various_pearls.jpg/210px-Various_pearls.jpg', ':content_file' => 'zz.jpg'); #$mech->get('http://google.com/ncr'); #print $mech->content( format => 'text' ); #$mech->get('http://google.com/ncr'); #print $mech->content( format => 'text' ); if($@){print "\n\$@ = $@\n"; $@=0;} if($!){print "\n\$! = $!\n"; $!=0;} print "\nDone\n"; <>; exit;