in reply to Re: Re: Word Counting
in thread Word Counting

You can use split to put the words into an array or a list:
my $line = "This is a line of text"; my @words = split /\s+/, $line;
Note that the /\s+/ bit technically isn't needed, because split defaults to splitting on whitespace.

There's more info on split on Perldoc.

Hope that helps,
-- Foxcub
A friend is someone who can see straight through you, yet still enjoy the view. (Anon)