Harch84 has asked for the wisdom of the Perl Monks concerning the following question:
(55.950254, -3.187606)
Now what I need to do is to get rid of the comma in this string and then to take the first part of coordinate "55.950254" and put it in front of the other part "-3.187606". The output should look like this:
(-3.187606 55.950254)
I have managed to get rid of the comma using this command in Perl:
... but im not sure how I could swap the two strings around using perl? If it helps both parts should be exactly 9 characters long.$origin =~ s/,//;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Swapping two parts of a string
by FunkyMonk (Bishop) on Jul 22, 2007 at 20:45 UTC | |
|
Re: Swapping two parts of a string
by grep (Monsignor) on Jul 23, 2007 at 01:50 UTC | |
|
Re: Swapping two parts of a string
by GrandFather (Saint) on Jul 22, 2007 at 20:53 UTC | |
|
Re: Swapping two parts of a string
by Harch84 (Acolyte) on Jul 22, 2007 at 22:37 UTC | |
|
Re: Swapping two parts of a string
by robot_tourist (Hermit) on Jul 23, 2007 at 12:03 UTC | |
|
Re: Swapping two parts of a string
by oxone (Friar) on Jul 25, 2007 at 21:07 UTC |