You want to use binmode before writing your file. But maybe you want to make LWP::UserAgent do all the work by doing the following instead:
$bot->get($url, ':content_file' => "image$x.jpg");
This will directly save the image to disk without further action on your part needed.
In reply to Re: retrieving JPG file with LWP and WWW:Mechanize
by Corion
in thread retrieving JPG file with LWP and WWW:Mechanize
by bfdi533
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |