We don't bite newbies here... much | |
PerlMonks |
Re: Replacing a given character starting with the xth occurence in a stringby Dr. Mu (Hermit) |
on May 22, 2001 at 10:53 UTC ( [id://82175]=note: print w/replies, xml ) | Need Help?? |
The following works without using any explicit
iterations. I haven't clocked its execution against the
others, though.
This prints: It works by cutting the string into two parts, applying the substitution to the second part (if there is one) and rejoining them.
In Section
Seekers of Perl Wisdom
|
|