in reply to Count word in my dir

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

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.