Help for this page
unless ($sftp->get("$file", "$local/$file")) { if (($sftp->error == SFTP_ERR_REMOTE_STAT_FAILED or ... } die $sftp->error; }