This is actually two replies in one. First, thanks (and ++) to Corion for pointing out the mistake in my solution above.
Now Bindo, your question for a solution without CPAN... I think doing SFTP in pure Perl, while possible, would be difficult and error-prone. If you just don't want any additional CPAN modules, that's another question:
As far as I see, your $REM_FILE already is a file name without directory, so you don't need the basename function and module, and can simply
Perhaps that already does what you want. Update: second parameter in get corrected$sftp->get($REM_FILE, $REM_FILE, callback => \&show_progress)
In reply to Re^9: Perl sftp behavior when there are no files in the share
by soonix
in thread Perl sftp behavior when there are no files in the share
by Bindo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |