in reply to Re^2: bsd_glob does not reset $!
in thread bsd_glob does not reset $!
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.
|
---|