in reply to Counting only certain files...
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."
|
|---|