Hello, Thanks for responding! :) Yes, if I manually do the same things I do get a zip file!
The difference is in the sizes of these files, the File downloaded via the script is a little bigger (about 20 KB) than the File downloaded manually with a browser (the file sizes are in MBs) So I guess there is some additional stuff in there ( $mech->content ) apart from the zip data, but no idea how to separate these two. Dhanashri -----Original Message----- From: Xavier Noria [mailto:[EMAIL PROTECTED] Sent: Monday, November 07, 2005 4:35 PM To: beginners perl Subject: Re: Using Mechanize to download a zip file? Importance: High On Nov 7, 2005, at 11:53, Dhanashri Bhate wrote: > I am trying to write a perl script using WWW:::Mechanize, to > download a > dictionary file from a server. > > The file is a zip file. The program given below (error checks have > been > purposely removed), > > This program runs without any errors/warnings, and i can see the file > downloaded in the specified location. > > > > The download is supposed to get me a zip file, but when i open the > file > using winzip/winrar i get an error. Can you confirm the file actually _is_ a zip file? Have you gotten a correct zip file if you do the same with a browser? -- fxn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>