Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: bsd_glob does not reset $!

by ikegami (Patriarch)
on Sep 29, 2006 at 15:19 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-20 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found