in reply to Help needed with Perl script designed to find files by extension and count the number of chars
Others have answered what was wrong, i wanted to show you a completely better way to solve the problem:
I covered the first requirement, all you need is a loop to process the char count from the files found. But ... why do you need this information? Wouldn't du -h provide the information you need without having to develop another solution?use strict; use warnings; use File::Find::Rule; my @found = File::Find::Rule ->file() ->name( map "*$_", @ARGV ) ->in( '.' ) ; print scalar( @found ), $/;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help needed with Perl script designed to find files by extension and count the number of chars
by Anonymous Monk on Apr 30, 2015 at 18:32 UTC |