dipesh777 has asked for the wisdom of the Perl Monks concerning the following question:
example: there are 100 files in folder and its being processed. is folder is empty then stop else continue to check until its empty.
using following code to see dir is empty or notThanks,use strict; use warnings; if (scalar </tmp/dipesh/*>) { print "not empty"; } else { print "Empty"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |