Thread testen ob Verzeichnis leer (33 answers)
Opened by alexus-777 at 2004-06-05 12:03

Gast Gast
 2004-06-05 16:02
#83035 #83035
oder so ...
Code: (dl )
1
2
3
4
5
opendir DIR, $dir or die $!;
my $files = grep /\.\w+$/, readdir DIR;
closedir DIR;

$files == 0 && print "Verzeichnis leer!";

View full thread testen ob Verzeichnis leer