good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: net ftp recursive - rls and rdirby Lotus1 (Vicar) |
on Sep 07, 2012 at 13:01 UTC ( [id://992308]=note: print w/replies, xml ) | Need Help?? |
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.
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 Section
Seekers of Perl Wisdom
|
|