in reply to string compare matches incorrectly

use Text::CSV or at least chomp your input lines.

If handling line ends correctly is not the problem then, as others have suggested, show us sample code and data that fails.

Perl is the programming world's equivalent of English

Replies are listed 'Best First'.
Re^2: string compare matches incorrectly
by sierpinski (Chaplain) on May 23, 2015 at 05:19 UTC
    Grandfather that was going to be my thought as well -- reading the input from a file would include the line breaks, so they need to be chomped in order to get an accurate comparison.