note
termix
<P>Shoot. I am missing something here. I tried your code. It loops the right number of times, but it seems to only see the last character (the first match in a greedy match). So an input of '12345' looks like '55555'.
<p>To test I tried
<P><code>
$x="12345";
for ($x=~ /./g) {
print $&;
}
print "\n";
</code>
<p> but this gives me "55555" again. I notice, I should
be using a while and I try:
<P><code>
$x="12345";
while ($x=~ /./g) {
print $&;
}
print "\n";
</code>
<P>which works. So I changed your code to use a while loop also and it works.
<P><font size=-1>--
termix</font>
134608
134640