You've got a lot of clutter in there. You are opening Hints.txt in two places, for example. You need to clearly understand what you want the computer to do, and in what order. Then code that. It might help for you to write out the steps in English (or other language of your choice) in comments first. Then under each step, write the code to perform that step. You might find that the code almost writes itself, then.

You have a lot of pieces that are more or less what you will want to use, but you haven't got them put together right. In particular, it doesn't look like you're reading DAFILE any more. You need to have a read-loop for that, surrounding the for-$j loop, so that the j loop is executed for every line read from DAFILE.


Caution: Contents may have been coded under pressure.

In reply to Re^3: Search Script by Roy Johnson
in thread Search Script by arebc

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.