in reply to
Comparing files with same name in different directories
You're using $lineCount as a global, and not resetting it between files so it just keeps going up and up and up.
Comment on
Re: Comparing files with same name in different directories
In Section
Seekers of Perl Wisdom