Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 contemplating the Monastery: (6)
As of 2024-03-28 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found