in reply to retrieving JPG file with LWP and WWW:Mechanize
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: retrieving JPG file with LWP and WWW:Mechanize
by bfdi533 (Friar) on Dec 26, 2006 at 17:44 UTC |