Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 having an uproarious good time at the Monastery: (3)
As of 2020-06-02 05:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (13 votes). Check out past polls.

    Notices?