Helping ordinary people create extraordinary websites!
   

How to sort a multidimensional array in Perl?

Tuesday, 6th October 2009
by new2perl


I have a text file that consists of about 1000 rows each with 15 columns. The columns are each 12 characters wide and contain either alphanumerics, numbers or or blanks.

I want to read the file into Perl, create an array 1000 rows by 15 columns and then sort the array, first by column 1 then by column9. Column 1 contains alphanumerics in the format ABCD3456 and column 9 contains numbers. There are no blank columns in columns 1 or 9.

I would like help to set this up is this the right place to ask?
Thanks
Chris





More Perl Help:
» What does this mean \*STDOUT?
» Using the Perl ftp object, how can I retrieve the CREATE date of remote files?