When you want to compare lines, it would make sense to use the line contents as hash keys, not the line numbers. (When you use line numbers as hash keys you can take an array instead in the first place).
A small sample of both input and desired output data would help to better and easier understand your problem. | [reply] |
i think the problem you are facing is due to the fact that
though for the programmer the values are entered in a sorted way but inside the hash values and their corresponding keys are stored in random sequence so it is very much possible that inside the hash the no 1 key value pair is not at all what you are expecting.
| [reply] |