http://qs321.pair.com?node_id=907929

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