On 12/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> John W.Krahn <[EMAIL PROTECTED]> writes:
> > perldoc -f rewinddir
>
> Is that faster or anything than using a second opendir?

Is it faster? What did you find out when you benchmarked both ways of coding it?

In any case, when you're reading a directory, you're reading data from
a disk; the large potential disk latency will swamp any processing
that Perl or your OS has to do, except perhaps in unusual situations.

Is it "or anything"? There's no great advantage that I can see, other
than whatever makes your algorithm easy to understand.

Don't sweat the small stuff; let your perl binary worry about making
your programs run "fast".

Cheers!

--Tom Phoenix
Stonehenge Perl Training

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


Reply via email to