in reply to Checking for Directories
For your second question:print "is directory" if -d "/foo/bar";
Sub-directories are in @subdirs.opendir DH, "/foo/bar" or die $!; my @subdirs = grep -d, readdir DH; closedir DH or die $!;
Umm, embarrassing update: read chip's answer below for why my second answer is broken. So use his code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Checking for Directories
by chip (Curate) on Jul 28, 2000 at 23:31 UTC | |
by mikfire (Deacon) on Jul 28, 2000 at 23:50 UTC | |
by chip (Curate) on Jul 29, 2000 at 00:30 UTC | |
by btrott (Parson) on Jul 28, 2000 at 23:48 UTC | |
|
RE: Re: Checking for Directories
by steveAZ98 (Monk) on Jul 28, 2000 at 23:31 UTC |