I'll pester you some more (you've earned it). The not-quite-helpful code snippets in this last reply of yours raises some more questions:
  1. We told you about the apparent problem with that "foreach" line having two open-curly brackets; in the snippet above, it looks like you removed both of them. What happened as a result?
  2. We told you about the fact that when you use "foreach my $variable (...) { ... }", the $variable's scope is limited to the loop, so if you want to use that same variable name anywhere outside the loop, you need to declare it with "my" outside the loop. Have you done that?
  3. Based on the too-lengthy-but-still-incomplete code that you posted a while ago, it seems like the overall design of the script is based on handling just one $SRC_DIR value per run, and (it's not clear, but) it seems like the one value could be a command-line parameter, so you could just run the original script twice (assuming it ever worked), once for each directory. Is there some reason you can't do that?
Well, no point going any further until you show us that you can at least answer some questions.

In reply to Re^7: To read files from two dir by graff
in thread To read files from two dir by pragovnj

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.