Try this:$ touch temp.txt $ mkdir dir.txt $ perl -le 'print scalar @{[<./*.txt>]}' 2
$ perl -le 'print scalar @{[grep {-f} <./*.txt>]}' 1
--
flounder
In reply to Re: Re: how to get total numbers of files in a directory?
by flounder99
in thread how to get total numbers of files in a directory?
by hweefarn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |