note
Caillte
<p>Chipped a bit off ;)</p>
<code>
sub mangle {
(@chars) = split '', shift;
for($i=1;$i<$#chars-1;$i++){
next if(substr(join('',@chars), $i-1, 4) =~ / /);
$buf=$chars[$i],$chars[$i]=$chars[$i+1],$chars[$i+1]=$buf if(rand(10)>5);
}
return join '', @chars;
}
</code>
<b>EDIT:</b> Never go away for 10 minutes before posting on one of these posts... you will always submit and find 50 better versions than what you wrote before you ;)
<hr>
<p><i>This page is intentionally left justified.</i></p>
<sub><p>janitored by [ybiC]: Replace <pre> tags around code snippet with <code> tags, as per Monastery convention</p></sub>
291720
291720