Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Re: Removing Duplicates in an array?

by mr.nick (Chaplain)
on Jun 26, 2001 at 17:55 UTC ( [id://91589]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Removing Duplicates in an array?
in thread Removing Duplicates in an array?

TIMTOWTDI: How about one that preserves the original order?
@a=qw( one two three for five six seven eight nine ten eleven); @hash{@a}=(0..$#a); @sorted=sort { $hash{$a}<=>$hash{$b} } keys %hash;

mr.nick ...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-20 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found