in reply to The "readdir()" fails to detect files created after the call to "opendir()"
Hello thejasviv, and welcome to the Monastery!
Try this:
opendir(my $dirh, "/somewhere") or die; while (1) { print "$_\n" while readdir($dirh); sleep(1); rewinddir $dirh; }
See rewinddir. I can’t test this as I’m on Windows (on which, see perlport).
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|