in reply to Re: ftp put problem!
in thread ftp put problem!

Thanks for your input. I'm fairly new to perl so i'm not really familiar w/ opendir. Once you get the opendir and readdir, how would you use a string so you can write a $ftp>put statement? thanks,

Replies are listed 'Best First'.
Re^3: ftp put problem!
by runrig (Abbot) on Jul 29, 2008 at 20:33 UTC
    The same as in your code (though you don't need the quotes, and ftp error messages are in the message() method, not $!):
    $ftp->put($name) or warn "Could not put $name, skipped: ".$ftp->messag +e();
    Note that readdir returns the file name without the path, so before putting you will have to either chdir to the directory, or prefix the directory name onto the string you pass to put().