in reply to net-sftp-foreign transfer failed vs file not present.

Hi,

one possiblity would be to check whether the file exists on the remote server via $sftp->ls($remote, %opts). You must be aware that this introduces a race condition, because between lookup and download it's possible that the file vanishes. The second possibility is to check the error message / exception for the error condition and react accordingly.

To your problem with sending stuff via send_nsca:

open my $fh, "|-", "send_nsca" or die "Arggghh, couldn't open pipe to +send_nsca: $!"; print $fh "All you want to send to STDIN of send_nsca"; close $fh or die "Something bad happended while piping to send_nsca: $ +!";

Regards
McA