in reply to array splitting and sorting

Or the module Data::Table. If the CSV file is similar to the one jeffa used earlier:
lastname,firstname,num1,num2,num3 Smith,Joe,40,76,175 Page,Betty,60,58,165 Nader,Ralph,55,63,190 Alexander,Sue,25,54,98 Saxon,Jackson,32,60,155
Then you can use this code to generate a Data::Table object. This example prints it out as an HTML table, but there are other options...
use Data::Table; # Create a table object from a CSV file my $table = Data::Table::fromCSV("data.txt"); # Sort by last name, then by first name $table->sort('lastname', 0, 0, 'firstname', 0, 0); # Print it as an HTML table, for example print $table->html;
buckaduck