my $text = " THIS is a variable number of words, spaces and punctuation. "; my @list = split /\W+/,$text;