On 12/1/07, Eric Krause <[EMAIL PROTECTED]> wrote:

> I have a string like:
> 11111xxx11xxxx111111xx11x1xxxx
>
> I would like to replace the 1's with the total of 1's like this:
> 5xxx2xxxx6xx2x1xxxx

Hmmm.... Smells like homework. What have you tried so far?

Your missing pieces of the puzzle may be: the /e flag on an s///
substitution, the length() function.

Good luck with it!

--Tom Phoenix
Stonehenge Perl Training

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to