Can some one help me out

The code you posted does not even compile:

$ perl -cw 1230041.pl Can't find string terminator ")" anywhere before EOF at 1230041.pl lin +e 17.

Here's what I would suggest in your situation.

  1. Fix all the compilation errors.
  2. Go through the resulting code and try to explain to yourself what each individual line is doing and how it is performing that action. If you can't do that for any of the lines, remove them and replace them with something simpler which you do understand.
  3. Having done 1 and 2 you now have some code which runs and which you understand. Now create an algorithm for anything else that you want the script to do.
  4. Code up the new algorithm.
  5. Test the new code. If it fails to meet your requirements go to 1.

In reply to Re^3: hash of hash by hippo
in thread hash of hash by Tigor

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.