in reply to Net::FTP put failing silently?

my $remote_file = $ftp->put($name) || die $ftp->message;

I've been told || does not get processed the same as "or". Try changing the line to my $remote_file = $ftp->put($name) or die $ftp->message; . That might show that your FTP put isn't really failing silently.

Are you sure you're in the correct directory for the listing as well?

Replies are listed 'Best First'.
Re^2: Net::FTP put failing silently?
by ikegami (Patriarch) on Aug 06, 2008 at 21:04 UTC

    my $remote_file = $ftp->put($name) || die $ftp->message;
    means
    my $remote_file = ( $ftp->put($name) || die $ftp->message );

    my $remote_file = $ftp->put($name) or die $ftp->message;
    means
    ( my $remote_file = $ftp->put($name) ) or die $ftp->message;

    Both are fine here.

Re^2: Net::FTP put failing silently?
by welchavw (Pilgrim) on Aug 06, 2008 at 20:51 UTC
    Did not work, sorry. Besides, "Debug" output clearly indicates that Net::FTP thinks that the transfer succeeds.

      Sorry, missed that in the debug output. So if you use a command line client can you see the file as expected? I've seen puts work, but issues with ls commands behind firewalls before.

        You got it - commandline works. I am suspecting firewall, too.