Hi All, on the beginning warm welcome to every one. Since few hours I`m trying to use Net::FTP::Recursive to list recursively all files on the some FTP server. At the moment its not possible for me because for some reason filehandler doesnt work for rls method. Maybe somebody will be able to help me here and solve my issue.
#!/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;
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

In reply to Net::FTP::Recursive - how to use rls by zalezny

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.