"Anthony E." wrote:
>
> hello,
Hello,
> 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 $new_text = join '', ($text =~ /(\s*\S+)/g)[0..499];
John
ner [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 16, 2002 3:37 PM
> To: [EMAIL PROTECTED]; Anthony E.
> Subject: Re: word count (limit) in a scalar...
>
>
> Anthony E. wrote:
>
> > i have a bunch of text in a scalar $text
> > How would I keep the word count to a
Anthony E. 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.
I know this isn't exaclty what you asked...
I'm taking a wild guess and thinking tha
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 real
On Tue, 2002-07-16 at 15:14, Anthony E. wrote:
> hello,
>
> 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.
>
> Thanks,
> Anthony
ASSUMPTIONS:
hello,
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.
Thanks,
Anthony
__
Do You Yahoo!?
Yahoo! Autos - Get fr