in reply to list two paths files into one array

  1. In case you haven't noticed during your four months in the monastery: always use strict; use warnings;
  2. How would you do it if there's just one directory? Can you get that code working? (hint: it requires fixing compiler errors in your example, and then simplifying your glob statement.
  3. Do you know how to then add more entries into your array with a second line of code? (hint: there's builtin functions for appending and/or prepending a list of values to arrays: see perlfunc).

if steps 1-3 get it for you, great. If not, show the working code (SSCCE) for #2 and the failing code for #3, and explain what your thought process was, and why you tried what you tried. If you cannot even get #2, post your failing code, and include the errors you are getting.

(haukex made some good glob-specific points while I was writing this, before I posted, that are likely to get you to the solution, too. TIMTOWTDI, and what I've presented is the series of steps I would take to debug the problem, if were it mine: simplify to a single directory; expand to multiple directories using the simplest perl syntax you can come up with. I'd recommend going through those steps to improve your coding and debug skills, even if haukex's suggestion works for you.)