http://www.perlmonks.org?node_id=929084


in reply to Words in Words

sarchasm,
See also Challenge: "Words" In A String. It isn't directly applicable to your problem but it might give you insight into various algorithms that can help you along.

Cheers - L~R