gennari has asked for the wisdom of the Perl Monks concerning the following question:

If I don't specify a local_file, the files come over happily...into my scripts directory. :-< If I do specify a local_file, they don't come over at all. What am I doing wrong?

$ftp = Net::FTP->new($masterHost); $ftp->login($osuser,$ospass); $ftp->type("binary"); $ftp->cwd($destDir); foreach $file (@logFiles) { $localFile = "$localArchDir\/$file"; print "localFile: [$localFile]\n"; $ftp->get($file, $localFile); } $ftp->quit;

Replies are listed 'Best First'.
Re: Net::FTP get doesn't like LOCAL_FILE
by chromatic (Archbishop) on Sep 13, 2001 at 02:38 UTC
    I'm sure they do. Are you looking for chdir perhaps?
Re: Net::FTP get doesn't like LOCAL_FILE
by gennari (Novice) on Sep 13, 2001 at 02:38 UTC
    Nevermind. A bit more twiddling, and I figured out that it wasn't happy with the type command. $ftp->binary went through just fine.

    Why do I always find that answer *after* I post the question?

    ltg