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