I don't see why that particular code wouldn't work. Though your for loop could be replaced with:
$number = grep { /WORDHERE/i } @files;
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
In reply to Re: Count word in my dir
by hardburn
in thread Count word in my dir
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |