Perl: the Markov chain saw | |
PerlMonks |
RE: Selective substitution: not in Perl?by atl (Pilgrim) |
on Aug 16, 2000 at 14:25 UTC ( [id://28088]=note: print w/replies, xml ) | Need Help?? |
Hi, a quick hack to solve your problem:
$n holds the number of occurences to be skipped, so $n = 1 means the second will be replaced. The output:
I believe that's what you wanted. IMHO it ain't ugly, too. ;-) Have fun ... Andreas
In Section
Seekers of Perl Wisdom
|
|