The problem might be that the getstore() expects character data, I'm not
sure.  What you can do is store it yourself, and force binary mode for the
filehandle.

#!/usr/gin/perl -w
use strict;
use LWP::Simple;

# untested
my $bin_data = get ('http://www.netcdf_url');

open OUT, '> filename';
binmode OUT
print OUT $bin_data;
close OUT;

Rob

-----Original Message-----
From: siren jones [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 11:01 AM
To: [EMAIL PROTECTED]
Subject: LWP binary file retrievals?


Is it possible to use LWP::Simple to retrieve a binary file (i.e. a .netCDF 
file)?  Using the following code I can retrieve what I'm guessing are parts 
of the file.  That is, what is retrieved is always 3871 bytes even though 
the file is actually much larger.  Worse, I can not read the .netcdf file 
once it is retrieved.   Any ideas why this may be the case?  Or better yet, 
how to grab a binary data file off the web?


#!/usr/gin/perl -w
use strict;
use LWP::Simple;
getstore ('http://www.netcdf_url', 'filename');


Thank you in advance.

-s

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to