Do you know where your variables are? | |
PerlMonks |
Re: Replace the nth occurenceby Kenosis (Priest) |
on Nov 21, 2012 at 07:22 UTC ( [id://1004858]=note: print w/replies, xml ) | Need Help?? |
I like your solution for replacing the nth occurrence of a character within a string. I don't know whether the following is a 'better suggestion,' but what about initializing $n (for the nth) to the desired occurrence:
Output:
In Section
Seekers of Perl Wisdom
|
|