blacknight has asked for the wisdom of the Perl Monks concerning the following question:
Hi everyone,
I am new user in perl and in PerlMonk I tried to change a duplicate element of table in a file. In other word I have this is the table format
xxxx . yyy 521 916 . + . ID=OSCAR1028v1rpkm9.67
xxxx . xxx 521 567 . + . Parent=OSCAR1028v1rpkm9.67
...
xxxx . yyy 126 130 . - . ID=OSCAR10281vrpkm9.67
xxxx . xxx 129 130 . - . Parent=OSCAR1028v1rpkm9.67
...
I am interested to change only duplicated ID="OSCAR10281v1rpkm9.67" section,
in order to mantain the first occurence of ID="XXXXXX" unchanged but the second and third and so on to change them in this way
ID=OSCAR10281v1rpkm9.67".1" ID=OSCAR10281v1rpkm9.67".2" ... ".4" ..."n"
n for occurence of specific ID="xxxx"
I thank you in advance for any suggestion that you will give me.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: rename duplicate data
by ww (Archbishop) on Jun 21, 2012 at 21:34 UTC | |
|
Re: rename duplicate data
by Kenosis (Priest) on Jun 22, 2012 at 02:58 UTC | |
by blacknight (Initiate) on Jun 22, 2012 at 12:46 UTC | |
by Kenosis (Priest) on Jun 22, 2012 at 16:37 UTC | |
by Anonymous Monk on Jun 24, 2012 at 20:36 UTC | |
by blacknight (Initiate) on Jun 26, 2012 at 11:11 UTC | |
by Athanasius (Archbishop) on Jun 26, 2012 at 12:00 UTC | |
|
Re: rename duplicate data
by monsoon (Pilgrim) on Jun 22, 2012 at 02:06 UTC | |
by blacknight (Initiate) on Jun 22, 2012 at 12:31 UTC | |
by ww (Archbishop) on Jun 22, 2012 at 16:09 UTC | |
by monsoon (Pilgrim) on Jun 22, 2012 at 15:01 UTC |