$a=~ s/^aa$/ee/
Do a bit research what ^ and $ mean in the context of a regular expression. Then it will become clear why your replacement won't work.
Happy learning! Rata
PS.: a good start is here: planetscapes collection
In reply to Re: not able to replace the element in the middle of the string
by Ratazong
in thread not able to replace the element in the middle of the string
by lakshmikant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |