Hi guys I have two arrays with the following elements inside them.
array#1 : sdjd dsjd ldlsd epw alask* djsdj array#2 : djsdj ldlsd epw alask<1> ghg alask<2>
I need to check if the elements inside both the arrays are present in each of the arrays. That is, I should be able to print out the exclusive elements in both the arrays. My problem is , I am getting stuck at elements which have * in the array#1. for example in the case above, alask* should match to alask<1> and alask<2> . How do I do this with a short code? any ideas? For the above two arrays, my result expected should be a print:
sdjd dsjd in array#1 not present in array#2 ghg in array#2 not present in array#1 alask* in #array1 matched to alask<1> alask<2> in #array2
thanks

In reply to Compare two arrays by kaushik9918

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.