Charles Harvey wrote: > Hello all, > > I am trying empty a directory with over 4000 files with a script, and > do not understand why I can only delete half at a time. I am guessing > that the directory handle has a size limitation?? Is there a way to > load the contents into a large array or am I going about this all > wrong? Please forgive the newbie question. I'm trying to hack this > with my copy of the Perl Bookshelf and limited practical experience.
I think it's because you're ingnoring one of the caveats of looping functions. It is best never to add or delete set members while iterating through a set.I'd suggest first collecting filenames, then deleting. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
