Be sure to chomp off the end of line characters first.
In reply to Re: How to have perl check line length by SuicideJunkie in thread How to have perl check line length by ddrew78