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

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().