Now onto the fun part: picking out stylistic miscues.
- open INPUT is traditional, it's true, but open my $inFH is far better. The traditional INPUT is global, my $inFH is lexical. For the drawbacks of global variables and the advantages of lexicals, see e.g. Conway, Perl Best Practices.
- Processing a file one line at a time is of course a good idea. The way to do it (and this is traditional) is
while (my $thisLine =<$inFH>)