P is for Practical | |
PerlMonks |
Re: sorting a file - multilevelby CountZero (Bishop) |
on Jun 14, 2008 at 18:45 UTC ( [id://692101]=note: print w/replies, xml ) | Need Help?? |
If it is a really big file, dump it into a database, index the fields you have to sort on and write some simple SQL to do the sort: SELECT * FROM BigTable ORDER BY Field01, Field02, Field10_bis You will of course have to add a Field10_bis so it sorts the 10th field in the required order! CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
In Section
Seekers of Perl Wisdom
|
|