in reply to To read files from two dir
What do you mean by "combine"? Do you mean copy them into the same directory, or do you mean concatenate them into one file and put the result in some directory, or do you mean process first one then the other in the same operation?
What do you mean by "not working". Are there error messages (if so, what - be specific), does the processor in your computer melt, or does something else happen or not happen? I can't tell where you are having trouble, but you might like to start from here:
use strict; use warnings; my @srcDirs = ("newDir1", "newDir2"); for my $SRC_DIR (@srcDirs) { print "Source dir: '$SRC_DIR'\n"; }
and expand that code just enough to demonstrate the issue. Don't do any more work than adding file name variables and manipulating them, then printing the result so you can see, and can show us, how you expect the file names to be handled.
For reference, the code above prints:
Source dir: 'newDir1' Source dir: 'newDir2'
Show us what your equivalent code prints and tell us what you expected to get.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: To read files from two dir
by pragovnj (Acolyte) on Apr 13, 2022 at 18:12 UTC | |
by Fletch (Bishop) on Apr 13, 2022 at 18:26 UTC | |
| |
by GrandFather (Saint) on Apr 13, 2022 at 21:08 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |