lakshmikant has asked for the wisdom of the Perl Monks concerning the following question:
I have a string
I am trying to replace the middle element of the string aa to ee but its not working, please let me know how to do that.$a = aabbccddaaffddnnaa
$a=~ s/^aa$/ee/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: not able to replace the element in the middle of the string
by Ratazong (Monsignor) on Jul 12, 2016 at 05:42 UTC | |
|
Re: not able to replace the element in the middle of the string
by hippo (Archbishop) on Jul 12, 2016 at 08:40 UTC | |
|
Re: not able to replace the element in the middle of the string
by Athanasius (Archbishop) on Jul 12, 2016 at 06:06 UTC | |
|
Re: not able to replace the element in the middle of the string
by Laurent_R (Canon) on Jul 12, 2016 at 10:43 UTC | |
|
Re: not able to replace the element in the middle of the string
by wrinkles (Pilgrim) on Jul 12, 2016 at 05:28 UTC |