Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1167595]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-03-19 07:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found