inhd has asked for the wisdom of the Perl Monks concerning the following question:
@array1 = ("Member1\tMember2"......"Member1\tMember2);<br> @array2 = (\@Member1, \@Member2, \@state_living, \@Membership_status, +\@member_since);
@array1 is has two elements(Member1 and Member2 separated by tab). @array2 is a multidimensional array and has reference to arrays of Member1 and Member2, state_living, membership_status, and member since).
Member 1 and Member 2 are grouped together, and each one is a unique pair, but belong to different states (state_living). Number of states in states_living array could vary from 2 to n numbers.
I need to retrieve for each of the Member1 and Member2 combination present in @array1 , their state living, and membership status from the other @array2.
I want the output to look something like this:
Mem_status State_living_1 State_living_2 Year_Since active Member 1 Member 2 2001
I hope I am clear. Any help/suggestions on how I can compare the two different arrays here and get the required information for each array1 from array2?
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to compare elements of two multi-dimensional arrays
by GrandFather (Saint) on Oct 05, 2009 at 00:51 UTC | |
|
Re: how to compare elements of two multi-dimensional arrays
by Sewi (Friar) on Oct 05, 2009 at 07:07 UTC | |
by GrandFather (Saint) on Oct 05, 2009 at 10:44 UTC |