On Tue, 16 Jul 2002 12:14:21 -0700 (PDT), "Anthony E." <[EMAIL PROTECTED]>
wrote:

>>i have a bunch of text in a scalar $text
>>How would I keep the word count to a maximum, and just
>>dump the rest.. ie - I only want the paragraph to
>>contain 500 words, and trash the rest.

my $text = "some really long line of character";
my $trimmed_text = substr($text,0,200);

this will take the first 200 characters of the $text scalar and assign it to the
$trimmed_text. I think this is what your looking for. :)

Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(985)902-8484
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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

Reply via email to