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)
In reply to Re: Help needed with Perl script designed to find files by extension and count the number of chars
by jeffa
in thread Help needed with Perl script designed to find files by extension and count the number of chars
by Griegomas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |