. . . if ($code == 000 || # got here w/ no resp $code == '021' || $code == 421 || # server timeout || abort $code == 425 || # connection not opened ('out of ports'?) $code == 150) { # intermediate result (never finished) $code < 100 and warn " No response (Timeout?).\n"; 150 == $code and warn "\tTimed out in mid-operation.\n"; 421 == $code and warn "\tServer disconnected.\n"; 425 == $code and warn "\tRestarting to clear connections.\n" and sleep 10; warn "attempting to reconnect? ...\n"; undef $_[0]; return undef; } if ($code == 530) { # not logged in! ** needs to croak() ** die "Can't seem to login! (check ~/.netrc file or give name and password on command line?). (I'm dieing) \n"; } if ( $code == 550 # dir/file not available (non-exist, no perms) || (500 <= $code && $code <= 504) # syntax errors || $code == 553 # illegal file name || $code == 452 || $code == 552 ) { # out of space(552: quota) return ''; } if ($code == 426 # closed early || $code == 450 || $code == 451 # file busy, srvr local error || $code == '051') { # added this: local rcv error warn "\tTemporary failure, retrying...\n"; sleep 12; return undef; # retry }