It always prints the "Has no items" and then proceeds to print fhe file name like French.txt and Spanish.txt. Am i doing something wrong? I also tried looping through the data array and printing stuff but it ended up not printing anythingopendir(DIR,$dir) or die "dead"; @textfiles = readdir DIR; foreach(@textfiles){ @data = stat($_); if(scalar(@data) == 0) { print "Has no items"; } print "$_\n"; }
In reply to Stat function returning an empty list by The_Last_Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |