in reply to Divide a list of string into substrings

Your requirements for substrings are fuzzy.

You split on

  • " " (mostly excluded),
  • "-" (at the end)
  • "+" (at the beginning).

    Your best bet is the list from a regex m/(pattern)/g

    Using the result as hash keys will guaranty unique entries.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery