in reply to how to get total numbers of files in a directory?
greetingsopendir(DIR, '/home/a') or die "couldn't opendir /home/a: $!"; while (local $_ = readdir(DIR)) { next unless $_ =~ /\.txt$/; print "$_\n"; } closedir(DIR) or die "couldn't close /home/a: $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: how to get total numbers of files in a directory?
by mpeppler (Vicar) on Dec 09, 2003 at 15:50 UTC | |
by Abigail-II (Bishop) on Dec 09, 2003 at 16:07 UTC | |
by Murcia (Monk) on Dec 10, 2003 at 13:19 UTC |