"oh, my gosh, this is more than i expected. thank you so much. T_T"

You're very welcome.

Some further responses came to mind as I was reading your reply; however, it appears they've already been covered, so there's no need for me to repeat them. As the update to your initial question indicates that your code is now "working perfectly", I'll assume that additional advice has clarified any outstanding issues.

You've apologised a number of times for the length of what you've posted. There's really no need: I don't see anything that's excessively long. In general, avoid adding anything not directly related to the question, and keep the code that does demonstrate the problem to a minimum. You can wrap long tracts of code (or data, or output, or indeed anything else you want to post) in <spoiler>...</spoiler> or <readmore>...</readmore> tags: but don't overdo it though — presenting too little can be just as bad as presenting too much.

"i forgot to mention - if i don't explicitly use "my (variable)" at the beginning of the code, i'm continuously told ... that it isn't explicitly defined at all, ..."

I suspect that was related to your indentation/nesting problem:

if (COND1) { my $var = ... } if (COND2) { # $var OUT-OF-SCOPE here }

That code is really:

if (COND1) { my $var = ... } if (COND2) { # $var OUT-OF-SCOPE here }

But the code you needed/intended was:

if (COND1) { my $var = ... if (COND2) { # $var IN SCOPE here } }

If you're referring to something else, you'll need to post example code.

— Ken


In reply to Re^3: help with user selected hash operations? by kcott
in thread help with user selected hash operations? by lunette

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.