in reply to Re: Unzipping files into a directory issue!
in thread Unzipping files into a directory issue!

I am fetching the file here:
# Set up FTP connection my $ftp = Net::FTP->new( $myhost ); $ftp->login( $myuser, $mypass ) || die "Could not login to $host: $ +@"; $ftp->cwd( $ftpsourcedir ) || die "Could not cwd $ftpsourcedir: $@" +; $ftp->binary(); # Get a list of files my @dircontents = $ftp->dir, "\n" || die "Could not list $ftpsource_di +r: $@"; @dircontents = sort( @dircontents );

Yes it was a typo for demonstrate the issue on "@dir_contents is not @dircontents.", it is actually @dircontents.

Replies are listed 'Best First'.
Re^3: Unzipping files into a directory issue!
by Eliya (Vicar) on Feb 18, 2011 at 13:55 UTC
    I am fetching the file here: ...

    No, you're not :)

    $ftp->dir only retrieves the file names from the remote directory, not the files themselves.  For actually fetching the files, there's the ->get method.