in reply to How do I read files in a directory and not directories?

Consider the following:

| hand waving on how we got here... | opendir(DIR,".") or die $!; while(my $name=readdir(DIR)){ next if -d $name; # takes care of . and .. as well | do something with file here... }
Certainly not the only solution.. but one of...

Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.