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

Re: Order-Preserving and Unique: List Cleanup

by jdporter (Canon)
on Jan 11, 2005 at 03:40 UTC ( #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
Node Status?
node history
Node Type: note [id://421181]
help
Chatterbox?
[marto]: finding bugs, either in the CPU layer or hypervisor, finding undocumented instructions
[zentara]: are you talikng about perf?
[Discipulus]: i miss what an undocumented instructions can be, and how can be used
[zentara]: perf
[marto]: X86_instruction_li stings
[marto]: Illegal_opcode

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-07-28 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (428 votes). Check out past polls.