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

lakshmikant has asked for the wisdom of the Perl Monks concerning the following question:

I have a string

$a = aabbccddaaffddnnaa
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=~ s/^aa$/ee/