Here's one of many ways....
#!/usr/bin/perl -w ################################################################## use strict; opendir(DIR,"."); my @list=grep /^.*[0-9].*$/, readdir(DIR); my $numfiles=scalar(@list); printf "%d files\n",$numfiles; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Peter L. Berghold --- Peter@Berghold.Net "Those who fail to learn from history are condemned to repeat it."
In reply to Re: Counting only certain files...
by blue_cowdawg
in thread Counting only certain files...
by SysAdm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |