Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Best method to eliminate substrings from array

by Anonymous Monk
on Jun 26, 2019 at 17:17 UTC ( [id://11101965]=note: print w/replies, xml ) Need Help??


in reply to Best method to eliminate substrings from array

Do all the values overlap with one big set or can there be disjoint sets? Are they always ordered? Can there be duplicates?
  • Comment on Re: Best method to eliminate substrings from array

Replies are listed 'Best First'.
Re^2: Best method to eliminate substrings from array
by catemp (Initiate) on Jun 26, 2019 at 17:26 UTC

    I am currently eliminating duplicates @arrWorkingCompletedChains = uniq @arrWorkingCompletedChains; and sorting the list largest to smallest @arrWorkingCompletedChains = sort { length($b) <=> length($a) } @arrWorkingCompletedChains;

    What I need to do is eliminate any overlapping string sets from the working array so the end result can be stored in our database

      you didn't answer one of the questions... more sample data plz
        I hope this enough of a sampling:
        2N0472|6N8595|9L1366|1189902|1413983|8B2026|1M3381|7K3377|3H5788|1F785 +4|8W1152|8R0721|9C5344|6W6672|9G7101|3023908|6Y1352|4P0489|2757803 3419308|3514531|3525716|3557019|3586192|3635776|3783741 3T3625|6T7765|9L1366|1189902|1413983|8B2026|1M3381|7K3377|3H5788|1F785 +4 3T3625|6T7765|9L1366|1189902|1413983|8B2026|1M3381|7K3377|3H5788|1F785 +4|8W1152|8R0721 3T3628|6T7765|9L1366|1189902|1413983|8B2026|1M3381|7K3377|3H5788|1F785 +4|8W1152|8R0721|9C5344|6W6672|9G7101|3023908|6Y1352|4P0489|1336934 4N4906|6N6481|9L1366|1189902|1413983|8B2026|1M3381|7K3377 4N4906|6N6481|9L1366|1189902|1413983|8B2026|1M3381|7K3377|3H5788 6N7936|6N5049|9L1366|1189902|1413983|8B2026|1M3381|7K3377|3H5788|1F785 +4|8W1152|8 R0721|9C5344|6W6672|9G7101|3023908|6Y1352|4P0489|2757803 6Y0248|6T7765|9L1366|1189902|1413983|8B2026|1M3381|7K3377|3H5788|1F785 +4|8W1152|8R0721|9C5344|6W6672|9G7101|3023908|6Y1352|4P0489|1336934 6Y0248|6T7765|9L1366|1189902|1413983|8B2026|1M3381|7K3377 6Y0248|6T7765|9L1366|1189902|1413983|8B2026|1M3381|7K3377|3H5788|1F785 +4|8W1152

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-23 06:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found