Perl - how to count words in specific columns for multiple files : I'm new to Perl and must change an existing Perl script.  I need to be able to count all the '500' in columns 1-3 in an entire file before moving on to the next command for that file, and then the next file.  I can have multiple input files.  I'm guessing the start would be something like this:

@files = <*INPUTFILENAMES>;

foreach $file (@files) {

   open (DATA,$file);

   then do the counts here}
  