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?
In reply to Re: Quickest way to get a list of all folders in a directory
by ack
in thread Quickest way to get a list of all folders in a directory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |