$ touch temp.txt $ mkdir dir.txt $ perl -le 'print scalar @{[<./*.txt>]}' 2 #### $ perl -le 'print scalar @{[grep {-f} <./*.txt>]}' 1