in reply to special directory entries
opendir (DH, $directory); my @files = grep { -f "$directory/$_" } readdir(DH); close (DH);
Note that this code returns *only* the files from the directory, ignoring both the parent path 'dot' entries and sub-directory entries. If you want the sub-directory entries, change the grep code to read -
perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: special directory entries
by clintp (Curate) on Dec 04, 2001 at 01:46 UTC | |
by rob_au (Abbot) on Dec 04, 2001 at 03:10 UTC |