ihbmy $string = "|90|93|foo|bar|91|92|95|96|906|"; my $result = join '|', map { s/^9[0-6]$/X/; $_ } split /\|/, $string, -1; print $result; __END__ |X|X|foo|bar|X|X|X|X|906|
In reply to Re: Re: Replacing consecutive tokens in 1 pass
by ihb
in thread Replacing consecutive tokens in 1 pass
by aarestad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |