note
btrott
Couldn't you just do this?
<code>
$data1 =~ s/(\S)(\S)/$2$1/g;
</code>
This takes two non-space characters in a row, and swaps
them.<p>
Perhaps it has slightly different behavior than yours, though. I
only tested it on your example.
88934
88934