in reply to Parsing Zonefiles

I don't have a lot of DNS experience, but any time you're trying to remove duplicates, a little voice should whisper "hash" in your ear. If you can parse the file so that each unique entry becomes the key of a hash, the hash will remove the duplicates for you.

Brad

Replies are listed 'Best First'.
Re^2: Parsing Zonefiles
by Elijah_A (Novice) on Aug 05, 2004 at 07:05 UTC
    I think I remember now how those hash thingies work, kinda like a dictionary... but how can that remove the duplicates?? sorry I didn't get that part, I'm still new to perl...
      Hashes remove duplicates because hashes have keys - you can't have 2 keys that are the same. If you try to add another key=value pair to the hash where the key already exists, the new key=value will just overwrite the old one.