I wrote a perl script to make a FTP connection to a remote machine like this
#----------------------------------------------------------------
#!/usr/local/bin/perl
open (FTP, " | ftp -v -n remote.comp.fr");
print FTP, "user username passwd\n";
print FTP, "bin\n";
print FTP, "prompt\n";
print FTP, "ls . remote.list\n";
open (LIST, "remote.list") or die "Impossible to open file"
my @list = <LIST>
close (LIST);
close(FTP);
#-----------------------------------------------------------------
The FTP part of the script works OK. The problem occurs when I want to open the
file remote.list before the close(FTP); I get "Impossible to open file"
Is it necessary to close the FTP connection to be able to read the file?
Any idea is welcome