I don't think the filehandle you are passing to rls() is valid. The cpan page for the FileHandle module provides examples that show you have to provide a filename for it to open.
use FileHandle; $fh = FileHandle->new; if ($fh->open("< file")) { print <$fh>; $fh->close; } $fh = FileHandle->new("> FOO"); if (defined $fh) { print $fh "bar\n"; $fh->close; }
You need a filehandle for output so use the second version.
Update: from the documentation for Net::FTP::Recursive:
All of the methods should return false ('') if they are successful, and a true value if unsuccessful.
The rls method will write the filenames into the filehandle. The code you showed expects the files to be returned as an array.
my @files = $f->rls(Filehandle => $fh) or die "??";In reply to Re: net ftp recursive - rls and rdir
by Lotus1
in thread net ftp recursive - rls and rdir
by poori
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |