in reply to SFTP::Foreign - lost connection on larger files
Post the details of your system: OS, perl, ssh and module versions.
Then, activate debugging adding the following line to your script and post the output here also:
$Net::SFTP::Foreign::debug = -1;
In Section
Seekers of Perl Wisdom