Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Divide a list of string into substrings

by LanX (Cardinal)
on Jun 20, 2020 at 19:40 UTC ( #11118282=note: print w/replies, xml ) Need Help??


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

  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Node Status?
    node history
    Node Type: note [id://11118282]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (4)
    As of 2020-12-04 05:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      How often do you use taint mode?





      Results (58 votes). Check out past polls.

      Notices?