I'd be glad to help.

The code is not terrible, on the surface. Frankly, it really only shows you're new to Perl -- no crime in that.

What was in question was whether or not the code was yours.

You still haven't made a convincing argument that it is -- but at least you are now addressing the questions.

So let's step through this, and see where we end up.

Let's start with this:

     tried to write a code to store the details of an employee into a text file as hash(%)

For a newcomer, it is not surprising you simply tried to write the hash into a file directly -- Perl does so many things for us automatically, you might presume it can do this, too.

Sadly, however, this is not a reliable technique. There are ways to make it reliable, but (get used to this, BTW) there's a question you need to answer first:

Do you want to use a Module, or write all the code yourself?

Where we go next depends on your answer.


In reply to Re^4: Some one help me with this code.how to make it work. by marinersk
in thread Some one help me with this code.how to make it work. by yedukondalu

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.