#Test FTP connections 1 $ftp1=Net::FTP->new($host1) or $ErrFlg=1; push @ERRORS, "Can't ftp to $host1: $!\n" if $ErrFlg; myerr() if $ErrFlg; print "SUCCESS: Connected to $host1\n"; $ftp1->login($username1,$password1) or $ErrFlg=1; push @ERRORS, "Can't login to $host1: $!\n" if $ErrFlg; $ftp1->quit if $ErrFlg; myerr() if $ErrFlg; print "SUCCESS: Logged into $host1\n"; $ftp1->cwd("$dir1") or $ErrFlg=1; push @ERRORS, "Can't cd to $dir1 $!\n" if $ErrFlg; myerr() if $ErrFlg; $ftp1->quit if $ErrFlg; $maxDepth=$maxDepth1; # Find function find ({preprocess => \&preprocess, wanted => \&wanted,}, "."); $ftp1->quit