Jessica,
There are a few tricks that might help you to start debugging this problem for yourself. First, find some code that does do what you want, compare it with your code, see if you can spot an obvious difference. Second, take the working code and make small, incremental changes toward the code that you want. Keep testing with each step, and as soon as it breaks, you know you've gone wrong.

It seems that at the moment you are trying to solve a problem that is too convoluted, too large to take in all at once. Follow the principle of insisting on bite-size pieces of the problem and things may be a lot easier.

Debugging is not an easy skill to learn, but if you establish some guidelines like these, and stick to them, it won't be so impenetrable. You may even enjoy it.

There are monks that may be able to glance at your problem and tell you the answer, maybe you will get an answer like this, but what will you learn? Nothing, and you won't have much fun beyond the immediate gratification.

Best of luck, let us know how you get on.

 


In reply to Re: MT perl question by EdwardG
in thread MT perl question by Anonymous Monk

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.