in reply to NET::FTP : Recursively search FTP directories (was: Net::FTP Problem)

#!/usr/bin/perl use Net::FTP; $ftp = Net::FTP->new("host.name"); $ftp->login("user","password"); @data=$ftp->ls("-Rla"); $ftp->quit; foreach $line (@data) { print $line."\n"; }

From there, it's just text parsing......

Malach
So, this baby seal walks into a club.....

Replies are listed 'Best First'.
Re: Re: Net::FTP Problem
by Hero Zzyzzx (Curate) on Jun 03, 2001 at 04:29 UTC

    Are these switches ("-Rla") implemented the same in all FTP servers? There's like a billion servers out there, and not all of them are totally standards compliant.

    If most of them do use these switches correctly, this is an excellent way to recurse (IMHO). If not, you may need to look a little harder.