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

Re: list of unique strings, also eliminating matching substrings

by Tanktalus (Canon)
on May 21, 2011 at 03:41 UTC ( #906032=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @sequences = sort { length($b) <=> length($a) } @sequences
    
  2. or download this
    
    use List::MoreUtils qw(any);
    ...
      push @uniq_sequences, $seq if
        any { index $_, $seq >= 0 } @uniq_sequences;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2021-09-22 03:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?