in reply to Word density

For starters, you could break on whitespace instead of word boundaries.

my @words = split(/\s+/, $content);
The + means it'll work on the double spaces after your punctuation.

Now for the other part of the problem. I know there is an easier way than this but the only idea I have is to retrieve the first three elements of the area and then pop off the first element. Do it in a loop until all elements are gone leaving you every two and three word phrase.



"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

sulfericacid