On Nov 7, 2005, at 13:33, Dhanashri Bhate wrote:

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)

That comment was the key.
I bet a beer this is a newline issue.

THANKS A MILLION XAVIER!!!!! :) :)
Yes that observation was the most important thing that actually I should
have mentioned in my first email...

Glad it got fixed :-).

I tried the alternative you suggested, and it worked :) Thanks again!

But a zip file would need to be written in binary mode on Windows.
Isn't it true for *nixes as well? (or the initial script will work as is on
FreeBSD?)
The program I'm writing is for test automation, and can be executed from either Windows on *nix systems, so I guess binary copy as you told would be
the best option.

Any portable script has to call binmode($fh) to hadle binary files. Even if the script is only meant to run on a Linux box I find a dubious practice not to set binmode on. That breaks potability in a subtle way that may be a maintenance nightmare someday.

binmode() does always the right thing _no matter the platform_, and in particular that code will work as is on Unix systems.

-- fxn


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to