Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: list of unique strings, also eliminating matching substrings

by wind (Priest)
on May 21, 2011 at 03:32 UTC ( [id://906030]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @list = qw(AGCT AGGT GG AGCT);
    
    ...
    my @unique = grep {defined} @list;
    
    print "$_\n" for @unique;
    
  2. or download this
    use strict;
    use warnings;
    ...
    my @unique = grep {defined} map {@$_} values %bucket;
    
    print "$_\n" for @unique;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-19 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found