in reply to FTP Transfer

I'm not sure what you were thinking when you decided to roll your own with IO::Socket, but here's an easier way:

use warnings; use strict; use Net::Ftp; use File::Find; my $ftp = Net::FTP->new("192.168.123.456", Debug => 0) or die "Cannot connect to host: $@"; $ftp->login("user",'password') or die "Cannot login ", $ftp->message; my @files = $ftp->ls(); foreach my $file(@files) { $ftp->get($file) or die "get failed", $ftp->message; }

Replies are listed 'Best First'.
Re: Re: FTP Transfer
by meetraz (Hermit) on Jun 01, 2004 at 20:38 UTC
    Is File::Find really required for this? Or is there something I'm missing ?
      I included that part as an illustration of how to get around the lack of "mget" in Net::Ftp.
Re: Re: FTP Transfer
by o0lit3 (Friar) on Jun 01, 2004 at 20:54 UTC
    Many thanks. I've never used Net::Ftp