qwerty155 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
My first question here, thanks in advance for any help you can give me. I'm looking to re-sort a text string (easily split to an array if req'd) that is currently in this format:
$string = "(x1,x1)(x2,y2)........(xn,yn)"
..and sorted by the x co-ordinate, then by y. How an I reorder the string by y co-ordinate first, then by x (without swapping the x & y round within the brackets - or at least swapping back if need be)?
Many thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (Hopefully) simple sorting question
by Corion (Patriarch) on Jun 03, 2011 at 08:18 UTC | |
Re: (Hopefully) simple sorting question
by AnomalousMonk (Archbishop) on Jun 03, 2011 at 11:33 UTC | |
Re: (Hopefully) simple sorting question
by qwerty155 (Initiate) on Jun 03, 2011 at 08:40 UTC | |
Re: (Hopefully) simple sorting question
by Anonymous Monk on Jun 03, 2011 at 09:01 UTC | |
by wfsp (Abbot) on Jun 03, 2011 at 09:59 UTC | |
by jdporter (Paladin) on Dec 05, 2011 at 14:40 UTC | |
Re: (Hopefully) simple sorting question
by sundialsvc4 (Abbot) on Jun 03, 2011 at 11:47 UTC |
Back to
Seekers of Perl Wisdom