Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Order-Preserving and Unique: List Cleanup

by jdporter (Paladin)
on Jan 11, 2005 at 03:40 UTC ( [id://421181]=note: print w/replies, xml ) Need Help??


in reply to Order-Preserving and Unique: List Cleanup

Here's another way:
sub uniq { my %h; @h{@_} = (0..$#_); @_[ sort { $a <=> $b } values %h ] }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-18 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found