foreach (readdir DIR) { # do stuff }