I have the following two arrays:
@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


In reply to how to compare elements of two multi-dimensional arrays by inhd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.