in reply to Quickest way to get a list of all folders in a directory

All of the responses to the OP's inquiry are excellent and I've learned a lot about some of more subtle capabilities and actions of Perl.

One curious thing in the OP's post: The OP use an open() rather than and opendir(). I thought you had to do an opendir() to be able to use readdir(). Am I mistaken?

ack Albuquerque, NM
  • Comment on Re: Quickest way to get a list of all folders in a directory

Replies are listed 'Best First'.
Re^2: Quickest way to get a list of all folders in a directory
by toolic (Bishop) on Aug 15, 2009 at 03:30 UTC
    I thought you had to do an opendir() to be able to use readdir().
    You are correct. Read the links that ikegami mentioned.