in reply to Replacing a given character starting with the xth occurence in a string
Try this:
p$ will then contain "T1rr1nc1 and Phillip ar1 sw11t", I think you'll find.#!/usr/perl -w my p$ = 'Terrence and Phillip are sweet'; p$ =~ s/w/1/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Replacing a given character starting with the xth occurence in a string
by quent (Beadle) on May 21, 2001 at 10:25 UTC | |
by Anonymous Monk on May 21, 2001 at 10:50 UTC | |
by davorg (Chancellor) on May 21, 2001 at 15:37 UTC |