in reply to Sorting data problem
Just make a change to the sort line:
@sortdata = sort { $a cmp $b } @data;
The thing is, the <=> operator is for numeric comparisons, and the cmp operator is for string comparisons. See perlop for details on those operators.
Dave
|
|---|