thanks, but again have a doubt. I got that my arrays(hashes) have only keys and values are undef. but my flat file is like 1111 2222 3333 4444 which I have loaded into an an hash say %hash1 and I was assuming that with this 1111 and 3333 will become the key for values 2222 and 4444 respectively, but I think I was wrong.

Indeed if you do something like

my %hash=qw/1111 2222 3333 4444/;

then %hash will have the structure you describe. However generally keys and associated values have a "different nature". Nothing prohibits them to be homogeneus, but I see no reason for them to be so in this case, so is it really what you want?

So I have two flat files just like the above sample and which I have loaded into two separate hashes say %hash1,%hash2, and if they have any not common values/key then store into another array or hash, does not matter. Please help me out...

I wish I could help you but it's hard to make sense of "common values/keys". Also despite your efforts the expression "then store into another array or hash" is still missing the object to be stored into whatever.


In reply to Re^3: How to compare two associative arrays efficiently by blazar
in thread How to compare two associative arrays efficiently by viveks_19

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.