<?xml version="1.0" encoding="windows-1252"?>
<node id="575475" title="Re^2: bsd_glob does not reset $!" created="2006-09-29 03:44:09" updated="2006-09-28 23:44:09">
<type id="11">
note</type>
<author id="5094">
stefan k</author>
<data>
<field name="doctext">
Hi all,&lt;br&gt;
a few notes on the replies

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;GLOB_ERROR&lt;/em&gt; ... Of course I read the perldoc and I tried to use GLOB_ERROR.  Unfortunately it is &lt;em&gt;not&lt;/em&gt; set to a value other than zero when the globbing produced no result. When I introduce a &lt;code&gt;print Dumper(GLOB_ERROR) &lt;/code&gt; after each call to &lt;code&gt;bsd_glob&lt;/code&gt; it shows '0' in every case.
&lt;li&gt;&lt;em&gt;$! is not reset&lt;/em&gt; ... Right, it would be quite counterintuitive if it were reset.  That was a stupid assumption of mine. But then, why &lt;em&gt;is&lt;/em&gt; it reset with &lt;code&gt;$pat4&lt;/code&gt; in the above example??
&lt;li&gt;As to chromatics question: Nah, I may be stupid but it's not that bad ;-)  This is not real world code it's just me trying to boil the problem down to some small example.  You are right, that I should have swapped the lines dumping the list and dumping &lt;code&gt;$!&lt;/code&gt;
&lt;/ul&gt;

I am still trying to get this working.  Any more pointers?
&lt;p&gt;
Following an old rule o' thumb: there must be something very  dumb in my thinking or in my code, taking into account the amount of time I have already spent with this problem ;-)

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-5094"&gt;
&lt;p&gt;
&lt;table width="80%" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tr&gt;
&lt;td&gt;&lt;small&gt;Regards...&lt;/small&gt;&lt;/td&gt;
&lt;td align="right"&gt;&lt;small&gt;
&lt;a href="http://www.skamphausen.de"&gt;stefan k&lt;/a&gt;
&lt;/small&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2" align="center"&gt;
&lt;small&gt;you begin bashing the string with a +42 regexp of confusion&lt;/small&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
575380</field>
<field name="parent_node">
575382</field>
</data>
</node>
