in reply to Re^2: How Do I Use Net::FTP
in thread How Do I Use Net::FTP
No, you should have read the docs on open, and probably perlopentut.
What I suggested above is that you open a file for output, and use its filehandle. You do that like this:
$ftp->binary; open my $filehandle, '>', 'c:/Temp/00000001.610' or die "Couldn't open output file.\n$!"; binmode $filehandle; $ftp->get("00000001.610", $filehandle); close $filehandle or die 'Couldn't close output file.\n$!"; $ftp->quit;
That is untested, so use at your own risk. Also, eliminate the $ftp->binary; line, and the 'binmode $filehandle;' line if you are dealing with text files.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How Do I Use Net::FTP
by Anonymous Monk on May 17, 2005 at 19:33 UTC | |
by davido (Cardinal) on May 17, 2005 at 19:41 UTC | |
by radiantmatrix (Parson) on May 17, 2005 at 20:40 UTC |