This is the line I used to sort ~30MB log files, based on the location of the section I wanted to sort by (the -k4 in the sort command). The standard sort command in Unix seems a whole lot faster than anything written in perl, which is why my script calls out to it.