@list = bsd_glob($pat, GLOB_ERR); if (GLOB_ERROR) { # an error occurred }