in reply to comparing 2 columns

It appears you have CSV, so you may consider using Text::CSV to do data import.

You never actually separate your columns. If a parsing module is heavier-weight than you want, you probably want to do a split on commas

my @fields = split /,/, $line;

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.