in reply to Why can't I readdir multiple times in a while loop?

Since this is Win32, you can have the OS notify you whenever a file is added to or deleted from that directory. I haven't used it, but Win32::ChangeNotify sounds like what you'd want to use.

        - tye (but my friends call me "Tye")
  • Comment on Re: Why can't I readdir multiple times in a while loop?

Replies are listed 'Best First'.
RE: (Guildenstern) Re: Why can't I readdir multiple times in a while loop?
by Guildenstern (Deacon) on Aug 24, 2000 at 23:57 UTC
    Once again, I must bow to tye. ChangeNotify makes the code ever so better, and I'm not constantly opening and closing the directory unless needed. I bet I looked at the module name a hundred times in the ActiveState help file, but it never clicked in my head to use it.
    BTW, I've posted my code over here. It's certainly not my best piece of code, but it works and hopefully I'll get some good feedback to help on my way to mastery.