Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: not able to replace the element in the middle of the string

by Ratazong (Monsignor)
on Jul 12, 2016 at 05:42 UTC ( #1167595=note: print w/replies, xml ) Need Help??


in reply to not able to replace the element in the middle of the string

$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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1167595]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (1)
As of 2018-08-18 14:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (185 votes). Check out past polls.

    Notices?