in reply to Re: Re: pattern matching a limited number of times
in thread pattern matching a limited number of times
Suppose you have the string:
You realize that it will only make sense after replacing the first three 'o's with 'oo's"The wodchuck at the zo stod on the stoop";
Oops, that yields:my $str = "The wodchuck at the zo stod on the stoop"; $str =~ s/o/oo/i for 1..3; print "$str\n";
The other solutions would have produced:The woooodchuck at the zo stod on the stoop
The woodchuck at the zoo stood on the stoop
-Blake
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re3: pattern matching a limited number of times
by bob49 (Initiate) on Sep 15, 2002 at 01:56 UTC |