Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Order-Preserving and Unique: List Cleanup

by hossman (Prior)
on Jul 30, 2003 at 06:58 UTC ( #279095=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %seen =() ;
    @unique_array = grep { ! $seen{$_}++ } @non_unique_array ;
    
  2. or download this
    perl -e '@a = $ARGV[0]? @ARGV : (<STDIN>); chomp @a; print join  "\n",
    + grep { ! $s{$_}++ } @a;' $*
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2015-07-30 23:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls