Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Remove duplicate strings from an array

by ferreira (Chaplain)
on Mar 13, 2007 at 14:48 UTC ( #604555=note: print w/replies, xml ) Need Help??


in reply to Remove duplicate strings from an array

This is almost a FAQ.

sub uniq { my %h; return grep { !$h{$_}++ } @_ }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2019-03-26 03:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How do you Carpe diem?





    Results (123 votes). Check out past polls.

    Notices?