I am new to work hash tables in perl

I personally believe that this is clear enough. I also believe you may be new to Perl in general. More precisely, when I read both "Hash accessing issue while returning hash from sub routinue" and "how to get the hash values and keys in same sequence while getting hash from sub routinue" even before proceeding, I feel the need to clarify: you can't do that. Specifically, subs can only return lists thus you can (typically) return a list of key-value pairs which will be assigned to a hash, or a hashref, which seems to be your case.

Even with the code tags added, though, it's hard to understand what your actual problem may be: we have some code from you, and an excerpt from the file it's supposed to operate on, but no indication whatsoever of how does the former fail to work like you expected, nor -more simply- what you would expect. Your mention of "same sequence" suggests what AZed suspected too: anyway, I know I'm a bit late answering your question, but I see no intervention of yours in this thread beyond the root node, so chances are you may still want to clarify so as to help us to help you.

--
If you can't understand the incipit, then please check the IPB Campaign.

In reply to Re: Hash accessing issue while returning hash from sub routinue by blazar
in thread Hash accessing issue while returning hash from sub routinue by tilak_sai

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.