in reply to Quickest way to get a list of all folders in a directory
You misread the 'perldoc -f readdir', what they mean by next directory entry is not that the entry is a directory- but that the element is an entry in the directory you opened.
I made my very silly directory subs.. may be of use.. LEOCHARRE::Dir. But really it's best to learn to do this.
Note that topkela made an excellent suggestion.
-d $directory or die("Not dir: '$directory'"); opendir(DIR, $directory) or die("cant open '$directory', $!");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Quickest way to get a list of all folders in a directory
by ikegami (Patriarch) on Aug 13, 2009 at 15:03 UTC | |
by leocharre (Priest) on Aug 13, 2009 at 15:06 UTC | |
by ikegami (Patriarch) on Aug 13, 2009 at 15:13 UTC | |
by leocharre (Priest) on Aug 13, 2009 at 16:35 UTC |