<?xml version="1.0" encoding="windows-1252"?>
<node id="295990" title="Re: Re: Re: Re: Efficient processing of large directory" created="2003-10-02 13:51:02" updated="2004-08-22 15:08:50">
<type id="11">
note</type>
<author id="154315">
BUU</author>
<data>
<field name="doctext">
Er, why on earth do you tell him to use [while] and then to use while to do the exact same thing the [for] loop had been doing previously? Your method is still going to need to build the 17,000 element list and iterate over it, it just uses a more explicit form. A rewrite which gets around this would be simply:
&lt;code&gt;
while(my $x = &lt;*.*&gt;)
{
  do_stuff($x);
}
&lt;/code&gt;
This will only read a single file at a time and has no need to create huge lists.</field>
<field name="root_node">
295965</field>
<field name="parent_node">
295973</field>
</data>
</node>
