Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: bsd_glob does not reset $!

by ikegami (Pope)
on Sep 29, 2006 at 15:19 UTC ( #575548=note: print w/ replies, xml ) Need Help??


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.


Comment on Re^3: bsd_glob does not reset $!
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://575548]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2014-11-24 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (137 votes), past polls