in reply to Re: list two paths files into one array
in thread list two paths files into one array

push accepts a list as the second "argument" (and provides list context in that position), so there's no need for the for loop around the second glob: push @files, glob "$Dir2/*"; is sufficient. Of course, now we've given the spoiler for my step #3... oh, well.

Replies are listed 'Best First'.
Re^3: list two paths files into one array
by Laurent_R (Canon) on Nov 14, 2017 at 08:28 UTC
    Yes, this is right: there is no real need for the for loop in this case. I thought that it was still better to show the process in an explicit loop since the OP is really a beginner. TIMTOWTDI, there are in fact many ways to do it.

    Sorry for "spoiling" your answer, I did not think about that, but just thought that the OP deserved a simple example solution.