in reply to Comparing arrays
I would suspect that it might be an easier option to use a hash of arrays, keyed on the IP address, so that you access something like $traparray{$device}[$eventnumber][$element]. This way would appear to allow easy access events for a specific $device.
I think that would allow you to push the items (traptype, interface, otherinfo) into @{$traparray{$device}}, thus not having to maintain track of $eventnumber at that time.
I look forward to the comments of other, wiser monks who may have more/better suggestions.
|
|---|