Pathologically Eclectic Rubbish Lister | |
PerlMonks |
sorting array of array references with multiple dereferenced array elementsby onlyIDleft (Scribe) |
on Sep 23, 2014 at 12:07 UTC ( [id://1101629]=perlquestion: print w/replies, xml ) | Need Help?? |
onlyIDleft has asked for the wisdom of the Perl Monks concerning the following question:
I want to first sort @array by element 1 of @a1, @a2, @a3 i.e. $ID , then by element 2 - $dom, then by element 3 - $domlen, by element 4 - $seq (which would be an alphabetical sort) and finally by element [0] - $ID (another alphabetical sort). After this sort, I want to extract the 1st element - "ID" from 1st de-referenced array, in @sorted_array I tried something on the lines of the suggestion at : http://www.perlmonks.org/?node_id=674374 by jettero, but get an error message - I suppose because what I am trying is to sort by elements in the deferenced array of arrays- which is not what the post here is talking about, right? Thank you in advance! PS. Sorry about the long post title
Back to
Seekers of Perl Wisdom
|
|