in reply to Re^2: Sorting Unique
in thread Sorting Unique

Look again at lines 4-5 and 8-9. In one case, you have a spelling error...so the only thing saving you is the existence of the second pair, which would be redundant were the first caught and corrected.

Perhaps you've posted code that is not be what you've actually written. Try to post with cut'n'paste, to avoid such problems.

And whether or not what's shown is your actual code, use strict;, use warnings, as they will alert you to problems with your variables, such as:

Global symbol "$file" requires explicit package name at F:\_Perl_\pl_test\921134.pl line 7. (your line 4)

Fixing those and rerunning would have allowed strict and warnings to point out additional syntax errors (not including the grammatical error in your print statement at your line 20). When you've dealt with those, you'll be free to concentrate on the logic.

You've already been alerted (by other Monks) to some of your logical problems; you've added to them and need to further your understanding of hashes.