sub scp_errors { use strict; my $line = shift; if ( $line =~ /Connection.+closed by remote host/ ) { # This is expected from an 8600. return(0); } else { # Get rid of CR and LF. $line =~ s/\012//g; $line =~ s/\015//g; print "Got error pulling file:\n"; print "\t", $line; print "\n"; return(1); } }