in reply to Comparing arrays

If you want to keep subsequent traps and compare them, you may want to use an array of hashes. The array lists all traps, in the order of their occurence and the hash maps IP, Trap type and Interface.

If you want to get seriously into this, you can also consider objects. Create an object to represent a Trap. Then you can compare them easily, define your own methods for them, etc.

BTW, it's hard to see a direct correlation between the subject and the body of your post.