There are a couple of modules that may do what you want. Check out these: Hash::MultiKey Data::MultiValuedHash Tie::AliasHash
But if you know a modicum of SQL and want to store the data, you may want to use SQLite. What you've described is a many-to-many relationship between the machines and IPs. You'd have three tables, a machine table, and IP table, and a pairing table that identifies each combination. - Mark. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of King, Dan > Sent: Monday, May 08, 2006 2:23 PM > To: [email protected] > Subject: Finding partly duplicated records > > I am at my wits end on this question. I feel like the answer > is probably simple but it has me beat. > > > I have a list of machines and IP addresses. The combination, > $machine and $IPAddress is never duplicated in the list. However, > $IPAddress may be duplicated and $machine may be duplicated. > > For example: > > m001ws 192.168.20.2 > m002ws 192.168.20.4 > m003ws 192.168.20.6 > m003ws 192.168.20.10 > m004ws 192.168.20.9 > m005ws 192.168.20.20 > m006ws 192.168.20.12 > m009ws 192.168.20.12 > > I want to find m003ws with its two IP addresses > m003ws 192.168.20.6 > m003ws 192.168.20.10 > > and 192.168.20.12 with its two machines. > m006ws 192.168.20.12 > m009ws 192.168.20.12 > > I also have a longer record consisting of about 9 fields where I want > to know if there is a duplication within one of the fields. > For example > > any time a userid appeared in more than one record. > > I was thinking that these are basically the same problem but I can't > seem to find any examples on the web. I would appreciate any help. > By the way, in the real problems I am looking at several thousand > 'records' and I need to run these reports once a day. > > Dan > > _______________________________________________ > Perl-Win32-Users mailing list > [email protected] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
