David Gerler wrote:
> 
> I figure that I can use substr() to cut up a string, but how do I make it
> between words?
> 
> How do I measure a string to see if it is greater than 85 characters?
> 
> Basically, if the string is more than 85 characters, how do I break it at
> the last full word?

$string =~ s/(.{1,84}\S)(?:\s+|\z)/$1\n/g;

Or:

@lines = $string =~ /(.{1,84}\S)(?:\s+|\z)/g;



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to