in reply to Sort by specific column
As you will see in your research, the built-in sort facility (as well as various CPAN modules) provide the means to supply your own “comparison function,” whose job is to determine the relative ordering of two records. This comparison function will of course be called thousands of times.
Having said that, I'd also point out that the sort commands of many operating systems (including Linux/Unix) provide many options ... so that you may well find that you have no need for “your own comparison function.” If the standard Unix sort command is told that:
Your research will quickly confirm that this is a very routine and straightforward requirement. It is well worth the time to acquaint yourself with the plethora of existing text-handling tools that are available.
|
|---|