foreach my $FILE (@FILES){ next if -d $FILE; print $FILE, "\n"; }