On Saturday 01 December 2007 08:30, [EMAIL PROTECTED] wrote:
> [EMAIL PROTECTED] writes:
> >> The main problem, I believe, is that you are using a stale
> >> directory handle. closedir (in main) and opendir here.
> >
> > Ha... and that was the problem... turns out it doesn't need to be
> > moved.  Once the typeo is corrected to closedir(DIR); it works,
> > with no reopen.
>
> Sorry, I spoke way to soon.   A quick test seemed to indicate the
> above was true, but in fact I had alread put a fresh opendir inside
> the function while testing your comments.
>
> So I neglected to remove it when my test seemed to indicate that
> simply correcting the typo was enough.
>
> So yup you hit it right.  After relocating the closedir and putting a
> new opendir inside the function it worked as I had intended....
> Thanks again.
>
> Does repeat open and closing of dir represent any kind of time drain?
> If so, how would I do the chore with only one opendir, or is it even
> possible or desirable?

perldoc -f rewinddir


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to