in reply to character flipping

I think this is what you're looking for... it will allow you to have as many 'flips' as you like, supplied in multiples of two ( that's what you had, I'd probably just say 1 = 1 flip, 2 = 2 flips and so on ).
sub mutate {
  my $strength = shift || 2;
     $strength = int( $strength / 2 );
  my $string   = q(Just another Perl Hacker);
  my $array    = [ split //, $string ];
  while ( $strength ) {
    my( $x, $y )     = ( int(rand(@{$array})), int(rand(@{$array})) );
    @{$array}[$x,$y] = @{$array}[$y,$x];
    $strength--;
  }
  my $mutated = join '', @{$array};
  return $mutated;
} # mutate()
print mutate(2),  "\n",
      mutate(4),  "\n",
      mutate(6),  "\n",
      mutate(8),  "\n",
      mutate(30), "\n";
--
Casey