Dan Sugalski wrote:
> 
> At 01:43 PM 2/18/00 -0500, Joe Kazimierczyk wrote:
> >I'm having some trouble with Net::FTP trying to ftp an oracle data
> >(which is in backup mode, so it's ok to copy).   When I run FTP
> >interactively from DCL, I can get the file without problems.  But when I
> >use Net::FTP, it tells me the file is locked, and exits.  I'm not sure
> >why there's a difference, since I must be using the same ftp sofware in
> >both cases?
> 
> Nope. The ftp client's very different. In the Net::FTP case it's entirely
> written in perl, while DCL's is probably in C or something.
> 
> Something's got the file open, and the default exclusive open that perl
> does is barfing on it. Assuming this file's safe to FTP (it's not got any
> fancy attributes, right?) then I'd open the file by hand with
> VMS::Stdio::vmsopen, read it in chunks (C<$/ = \65536;> is your friend if
> you're running 5.005_03) and use the Net::FTP::datasend to slam the chunks
> down yourself.
> 
> A bit less easy, but not bad. And this way you can put up some sort of
> progress display as you go. :)


I tried a plain perl 'open' of the file, and it works fine so I'm
surprised that ftp complains. But I can't take your suggestion because I
need to run this step in a larger program to 'get' the file.  How does
the ftp code do the file open to get a remote file?  (I looked in the
code, but was a little lost).  I guess my other option is to spawn the
Multinet FTP command instead of using Net::FTP, which should work but is
not as elegant.

Reply via email to