for my $dir (glob "/strek/*/logs") { for my $i (0 .. 4) { print "$dir/rlog$i.sr.html either does not exist or is 0 bytes!\n" unless -s "$dir/rlog$i.sr.html"; } }