Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Adding Unique Elements to Array

by Steve_p (Priest)
on Feb 28, 2005 at 23:14 UTC ( #435229=note: print w/replies, xml ) Need Help??


in reply to Adding Unique Elements to Array

Have you tried tieing a hash to Tie::InsertOrderHash? Add your values as the key of the hash and it will prevent duplicates. Pull back the keys with keys(), and it will return them in the order they were inserted.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2021-04-18 09:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?