in reply to sorting a file - multilevel

Hi, I have a (big) file that I need to sort

"big" is a very relative term, could you provide something more specific?

If you have enough RAM to load all the data in an array, Sort::Key will allow you to sort it easily and probably faster than with any other method:

use Sort::Key::Multi qw(u3_keysort); # u3 stands for 3 unsigned intege +r keys my $ix = 0; my %map_10th = map { $_ => $ix++ } qw(GENE UTR ...); my @data = ...; my @sorted = u3_keysort { my @key = split /\s+/; ($key[0], $key[1], $map_10th{$key[9]}) } @data;

If you don't have enough RAM, then try with Sort::External or just with the sort command provided by your OS.