My perl : This is perl 5, version 34, subversion 0 (v5.34.0) built for x86_64-linux-gnu-thread-multi$ perl pm1.pl < pm1-dat.txt george:2~~14 nick:5~~10~~20 peter:3
Your code uses an un-declared $a which is also used by sort.
Your perl seems to encounter side-effects of that.
I recommend you use a declared variable NOT named $a, or $b.
"These opinions are my own, though for a small fee they be yours too."
In reply to Re: Why is my code producing weird output?
by NetWallah
in thread Why is my code producing weird output?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |