Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Divide a list of string into substrings

by LanX (Saint)
on Jun 20, 2020 at 19:40 UTC ( [id://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
    Domain Nodelet?
    Node Status?
    node history
    Node Type: note [id://11118282]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others about the Monastery: (3)
    As of 2024-04-25 17:37 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found