See the Net::SFTP::Foreign documentation.
rput() is for recursively transferring directory contents. put() is for transferring individual files.
See also: setcwd() for changing the remote directory and chdir for changing the local directory.
Unrelated to your problem, but readdir has an example using grep which could greatly improve your code populating @files (in particular, you could get rid of the two until loops and the splice operations).
-- Ken
In reply to Re: rput on foreign sftp in perl
by kcott
in thread rput on foreign sftp in perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |