Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Answer: How do I replace a substring (if exists) with a different substring in a string?

by davorg (Chancellor)
on Jul 20, 2001 at 13:50 UTC ( #98358=categorized answer: print w/replies, xml ) Need Help??

Q&A > strings > How do I replace a substring (if exists) with a different substring in a string? - Answer contributed by davorg

With appropriate use of index, length and substr.

And remember that substr can be used as an lvalue.

  • Comment on Answer: How do I replace a substring (if exists) with a different substring in a string?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[choroba]: Good afternoon!
[GrandFather]: Good evening
[choroba]: Anyone from the East coast to say Good night?
[Discipulus]: still off place choroba?
[choroba]: till the end of the week

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2017-02-27 07:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (376 votes). Check out past polls.