in reply to Counting characters in a string

That was actualy a bit of fun there. Not sure how you wanted to handle cleaning up the spaces but here is my go at it. I used a while loop with a regex and the /g modifier. The regex is /(.{10,}?\b)/gThat should be read as find 10 or more occurances of any character followed by a word break ( you could change this to a space or \s, however it suits you, this just works pretty well). Here is the full bit, you would have to change the printing to concating into a new string but thats no challenge.

1234567890123456789 this is just a sample of a string , there is nothing really important in the scalar , just a lot

___________
Eric Hodges