Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 contemplating the Monastery: (4)
As of 2014-08-01 04:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (256 votes), past polls