zalezny has asked for the wisdom of the Perl Monks concerning the following question:
I would like to be able to print output from $ftp->rls to screen and if its possible save it to file. It seems that I dont understand perl "filehandle". Maybe somebody will be able to help me here pasting working solution. FTP server is public(Centos mirror). How to list all files with using "rls" command on that server ? Thanks in advance for Your support. Zalezny#!/home/tom/scripting/perl5/bin/perl use Net::FTP::Recursive; use warnings; use strict; use FileHandle; my $ftp = Net::FTP::Recursive->new("artfiles.org", Debug => 1); $ftp->login("anonymous",'me@here.there'); $ftp->cwd('/'); open FH,"> rlist.db"; my @ftpfiles; @ftpfiles = $ftp->rls(<FH>); print @ftpfiles; $ftp->quit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::FTP::Recursive - how to use rls
by GotToBTru (Prior) on Oct 20, 2014 at 19:43 UTC | |
by Discipulus (Canon) on Oct 21, 2014 at 07:27 UTC | |
|
Re: Net::FTP::Recursive - how to use rls
by Loops (Curate) on Oct 20, 2014 at 20:08 UTC | |
by zalezny (Novice) on Oct 20, 2014 at 20:28 UTC |