I have a hash of arrays (perl) whose key is a string joined by tabs. This is how the key of the hash looks like
chr"\t"fivep"\t"threep"\t"strand # separated on tab
If the hash is named %output
I want to sort the keys of this hash such that first the sort is done on chr, then on fivep and then on threep.
I tried the below code for sorting:
foreach my $k(sort keys %output){
print join("\t",$k,@{$output{$k}}),"\n";
}
This sort only the chr but I want to sort fivep after it and then threep.
How can I perform that?