Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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?
[ambrus]: Corion: really? Does that mean the Prima watcher objects behave as handles that stop the watcher when they're destroyed, just like AnyEvent expects?
[ambrus]: "all the bugs" -- hehe, good luck
[ambrus]: Corion: what I don't understand is, if you make a one-shot AnyEvent timer with short timeout, does this code guarantee that the Prima timer can't queue two timeout events before invoking any of them?

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2016-12-09 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (149 votes). Check out past polls.