in reply to Re: sorting a file - multilevel
in thread sorting a file - multilevel

Has the first number always the same length?

Length of a numeric field is not an issue. Using unix (or gnu) sort, the OP problem would be a simple command line:

sort -k 1n -k 2n -k 10 big.file > sorted.big.file
That's equivalent to doing something like this in perl (but the perl version might take a lot longer, esp. if the file, stored in perl as an AoA, is bigger than available RAM):
perl -lane 'push @f,[@F]; END{ print join(" ",@$_) for (sort{$$a[0]<=>$$b[0] || $$a[1]<=>$$b[1] || $$a[9] cmp $$b[9]} @f)}' big.file > sorted.big.file