in reply to Re^2: My Perl/Expect script aborts when sftp connection stalls at remote destination
in thread My Perl/Expect script aborts when sftp connection stalls at remote destination

Really, forget about solving your problem with Expect and use one of the Perl SFTP modules. It doesn't matter how hard it is to get it or a new version of the script in production. Properly done, your file transfers will be reliable and you will not have to worry about them anymore. It will pay back!

My own recommendation is to go with Net::SFTP::Foreign, but I am the author, not completely unbiased!

  • Comment on Re^3: My Perl/Expect script aborts when sftp connection stalls at remote destination