![]() |
|
Do you know where your variables are? | |
PerlMonks |
Re: Re: Digit Densityby termix (Beadle) |
on Dec 27, 2001 at 21:40 UTC ( #134662=note: print w/replies, xml ) | Need Help?? |
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'. To test I tried
but this gives me "55555" again. I notice, I should be using a while and I try:
which works. So I changed your code to use a while loop also and it works. -- termix
In Section
Code Catacombs
|
|