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: $!";
In reply to Re: how to get total numbers of files in a directory?
by kodo
in thread how to get total numbers of files in a directory?
by hweefarn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |