in reply to Reading a File by Line then Analyzing each Line

I'll answer the latter half of your node later (it's time for lunch), but let me just say that your file-opening-and-reading code is really cumbersome. It's so much easier just to do:
open my($fh), "<", "/path/to/file" or die "can't read /path/to/file: $ +!"; while (my $line = <$fh>) { # do stuff with $line } close $fh;
As for line analysis, I'll write something after I've eaten (but I'll be too late, since I'm sure some other monks will give you sound advice).

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart