Unfortunately it is not set to a value other than zero when the globbing produced no result
No matches is not an error. You could check for that condition explicitely.
if (GLOB_ERROR || !@list) { ... error or no match ... }
But then, why is it reset with $pat4 in the above example??
The value of $! is meaningless on success. It could be zero, non-zero, undef, etc.
In reply to Re^3: bsd_glob does not reset $!
by ikegami
in thread bsd_glob does not reset $!
by stefan k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |