Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I tried this but it doesn't seem to work:
@numfiles = grep { /^\.txt/ && -f "$directory/$_" } readdir(DIR);
All the files are .txt files.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: seeing all files in a directory
by Hot Pastrami (Monk) on Dec 22, 2000 at 02:21 UTC | |
|
Re: seeing all files in a directory
by ryddler (Monk) on Dec 22, 2000 at 09:08 UTC | |
by Gerard (Pilgrim) on Oct 08, 2001 at 17:20 UTC | |
|
Re: seeing all files in a directory
by Fastolfe (Vicar) on Dec 22, 2000 at 01:24 UTC | |
|
Re: seeing all files in a directory
by lemming (Priest) on Dec 22, 2000 at 01:24 UTC |