in reply to YET another regexp puzzle
#!/usr/bin/perl use strict; use warnings; my $w = 'jigglewort'; do {my $t = $w; pos ($t) = $_; $t =~ s/\G(.)(.)/$2$1/; print "$t\n"} for 0 .. length ($w) - 2; __END__ ijgglewort jgiglewort jigglewort jiglgewort jiggelwort jigglweort jiggleowrt jigglewrot jigglewotr
Abigail
|
|---|