Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Duplicate Element in an Array

by nemesdani (Friar)
on Aug 21, 2012 at 21:02 UTC ( #988868=note: print w/replies, xml ) Need Help??

in reply to Duplicate Element in an Array

First and most importatly, try it.
If I understand your problem well enough ( which I'm not sure of, sorry), try to use hashes instead of arrays. If the imput number doesn't exist in the hash as a key you create it, if it does, you create another hash with the given key. Values are not important.
Tiresome. Maybe an expert has a better solution, but it would be useful to know, what will you use these arrays or hashes for.

I'm too lazy to be proud of being impatient.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://988868]
[marto]: I don't think their inability to make any sense is related to alcohol
[Discipulus]: their?
[karlgoethebier]: marto: "their inability.." Perhaps the result of a wrong education?
[karlgoethebier]: or no education?
[choroba]: their = his or her
[Discipulus]: anyway once I proposed an automatic font decrease for post below -1, stepping every 5 votes: i'm still thinks it's a good idea but dunno if feasible
[shmem]: ...emulated dual in english

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (11)
As of 2017-05-23 08:16 GMT
Find Nodes?
    Voting Booth?