for (readdir DIR) { if (-f "$pfad/$_") { push @inhalt, $_; $counter++; } }