<?xml version="1.0" encoding="windows-1252"?>
<node id="575381" title="Re: bsd_glob does not reset $!" created="2006-09-28 12:19:41" updated="2006-09-28 08:19:41">
<type id="11">
note</type>
<author id="9073">
merlyn</author>
<data>
<field name="doctext">
I'm not sure if it's documented except indirectly but &lt;c&gt;$!&lt;/c&gt; is never supposed to be reset on success, only set on failure.  That's because it mimics the underlying &lt;c&gt;errno&lt;/c&gt; variable in libc, and that's the way it works.
&lt;p&gt;
Thus, never look at $! unless you know the thing you just did caused an error from which you need details.
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-9073"&gt;
&lt;p&gt;-- [http://www.stonehenge.com/merlyn/|Randal L. Schwartz, Perl hacker]
&lt;br&gt;
Be sure to read [id://205373|my standard disclaimer] if this is a reply.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
575380</field>
<field name="parent_node">
575380</field>
</data>
</node>
