S
ST
I am using LWP::simple to download images on windows XP using Perl
5.6.1. Somehow the downloaded image is corrupt; it shows similar size
as of the proper image but when I open it, it's messed up. Here is
what my script looks like:
use LWP::Simple;
$page =get("http://www.../a.jpg");
open(PAGE,">amy1.jpeg");
print PAGE $page;
close PAGE;
Any idea what might be wrong? Should I be using some other LWP option?
Also, what's the "best" way to invoke perl on windows? I use the right
mouse botton on the script file and use "open with -> perl
interpretor..". However, this does not show the errors/warnings. Is
there a debug mode / command line mode available for perl on windows?
Thanks!
5.6.1. Somehow the downloaded image is corrupt; it shows similar size
as of the proper image but when I open it, it's messed up. Here is
what my script looks like:
use LWP::Simple;
$page =get("http://www.../a.jpg");
open(PAGE,">amy1.jpeg");
print PAGE $page;
close PAGE;
Any idea what might be wrong? Should I be using some other LWP option?
Also, what's the "best" way to invoke perl on windows? I use the right
mouse botton on the script file and use "open with -> perl
interpretor..". However, this does not show the errors/warnings. Is
there a debug mode / command line mode available for perl on windows?
Thanks!