in reply to Sorting complex records

Ok, if your data are stored in a file, say, in tab delimited format, you can sort the records without using perl at all:
sort -t "\t" -k 2 file.txt > file.out
This will sort the file based on the 2nd field in the file, and output the sorted records to file.out.
sort -t "\t" -k 3 -n file.txt > file.out
This will sort the file based on the numerical value of field 3.

(Untested)