my $dir = "/var/tmp/monk"; chdir("$dir") or die "$!"; opendir(BIN, $dir) or die "Can't open $dir: $!"; #Read Directory readdir DIR; # reads . readdir DIR; # reads .. if (readdir DIR) { #now there should be a file or folder print "it's not empty"; } else { print "it is empty"; } close DIR;
In reply to Re^2: run program until directory is not empty
by zac_carl
in thread run program until directory is not empty
by dipesh777
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |