in reply to comparing 2 columns

If your files have a different format, why do you read them in through the same subroutine?

Maybe you want to read perlfaq4 on "difference" ? Reading that should give you an idea of what the last line of your script does. After knowing what the last line does, you should be able to modify get_file or the data structure in %a and %b accordingly.