my @snowball = qw( I do not know where family doctors acquired illegibly perplexing handwriting; nevertheless, extraordinary pharmaceutical intellectuality, counterbalancing indecipherability, transcendentalizes intercommunications' incomprehensibleness. ); s/\W// foreach @snowball; # punctuation doesn't count ;-) my @answer = map { length } @snowball;