in reply to Re: Scalar size limits
in thread Scalar size limits

What if the word isn't 51 characters long, but 101? Or 300? or 314159? Your code would break it into a word 50 chars long, then a hyphen, then the rest of the long string.

When I first looked at this problem, I though inserting the hyphen would be the easiest solution. After I started working it out, I think its actually the hardest.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: Re: Scalar size limits
by Anonymous Monk on Jun 26, 2003 at 16:30 UTC
    That's true...that could be a problem. I need it setup so no word can be larger than a specified limit and if it is, break it up into two words by a space or a hyphen. Whether it be 51 or a million, I have to get them broken up.

    Artist, I want to try your code but I don't quite understand how to implement it. Let's say I have $description, how would I use that with your example? Sorry, I'm just a little confused.