thmsdrew has asked for the wisdom of the Perl Monks concerning the following question:
I have a huge list of tuples in a text file, each of them separated by a new line, that are of the following format:
blahblah blahblahblah blohblohbloh blohblohbloh hithere byethere foobarfoo barfoobar
... and so on. I need to sort these tuples by the second value, which is separated from the first value by a tab character. I don't want to have to swap the tuples, sort them, then swap them back, because that seems inefficient and dumb, but I can't think of a good way to do it otherwise.
Any tips on accomplishing this task?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Sorting a "tuple" by the second value
by Anonymous Monk on Apr 09, 2012 at 04:17 UTC | |
by thmsdrew (Scribe) on Apr 09, 2012 at 04:53 UTC | |
by johngg (Canon) on Apr 09, 2012 at 12:22 UTC | |
by thmsdrew (Scribe) on Apr 09, 2012 at 18:03 UTC | |
by sundialsvc4 (Abbot) on Apr 09, 2012 at 18:38 UTC | |
by Anonymous Monk on Apr 09, 2012 at 08:13 UTC | |
by thmsdrew (Scribe) on Apr 09, 2012 at 18:00 UTC |
Back to
Seekers of Perl Wisdom