in reply to YET another regexp puzzle
And the output is as expected -my $str = "jigglewort"; my @a = split //, $str; print join('',@a[0..$_-1, $_+1, $_, $_+2..$#a]),"\n" for 0..$#a;
ijgglewort jgiglewort jigglewort jiglgewort jiggelwort jigglweort jiggleowrt jigglewrot jigglewotr jigglewort
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: YET another regexp puzzle
by carric (Beadle) on Nov 20, 2003 at 03:12 UTC |