Re: deleting duplicates in array using references



billb <billbealey@xxxxxxx> wrote in comp.lang.perl.misc:
On 30 Jul, 19:46, Paul Lalli <mri...@xxxxxxxxx> wrote:
On Jul 30, 2:37 pm, billb <billbea...@xxxxxxx> wrote:

i have a multidimensional array, but i want to delete duplicate
^^^^^^^^^
[Paul's solution snipped]

ah, very simple and very fast as well! I'll have to understand how
this is working. It uses a hash I see. Many thanks.

On hearing the word "duplicate", like a Pavlovian dog a Perl programmer
goes "Hash, hash, hash...". The word "unique" has the same effect.

Anno

.



Relevant Pages

  • Re: SQL TOP 50,000 Help
    ... A lot of the time, people use AutoNumber as their primary key, and the ... the column used to generate the hash number contains many equal ... to ensure equal distribution of values. ... Of course, there might be a few duplicate numbers generated, ...
    (microsoft.public.access.formscoding)
  • Re: How good are checksums?
    ... >checksum and compare file lengths. ... >duplicate very low. ... I use a fast Adlerian checksum. ... Your problem is similar to what to do with hash table collisions. ...
    (comp.lang.java.programmer)
  • Re: problem with hash & sort array
    ... Then I put the hash into an array with the sort ... The twist is I have to identify the duplicate ... a real data structure, and in the next place I make the exact opposite ...
    (comp.lang.perl.misc)
  • Nuby - help with Ruby object references
    ... As a learning exercise I decided to write a short program that would traverse a directory tree and take note of all duplicate files in that tree. ... If I run across a filename for which a key already exists in the hash, I do a deeper equality check to see if they are really the same file or if they are different. ... I push this new path into my array of arrays so I can check against it if I find yet another file with that name. ...
    (comp.lang.ruby)
  • Re: Question about Hash table in C
    ... calculate its hash value. ... Before you store the ... empty, then the new key is not a duplicate and you can store it. ...
    (comp.programming)