in reply to Sorting issues

I've enjoyed good results with the Data::Table module, which provides functions for reading tables from CSV or a database. It can output HTML tables or CSV. It also provides functions for sorting, mapping, reordering, slicing, etc. I like to use a header on the CSV file, so that I can refer to columns by name.
use Data::Table; my $t= Data::Table::fromCSV("data.csv"); $t->sort('exp', 0, 1); #Sort table by col 'exp', numeric, descending print $t->csv;

For my test file, this program prints:

name,exp,level
merlyn,14272,10
tilly,13067,10
dkubb,1076,7
LD2,807,6
toma,17,1

I don't plan on spending any more time debugging CSV-type parsers, and I have an easy migration path for upgrading to using a relational database.

It should work perfectly the first time! - toma