if ( !$ftp->cwd($directory) ) { push @ERRORS, "Can't cd $!\n"; myerr(); $ftp->quit; }