As of right now, I have 22 files that and 22 separate, but identical (in task), scripts for each file. Very basically, this is what I have:
file_1.txt, file_2.txt,..., file_22.txt
and for each file, I have a script:
script_1.pl, script_2.pl,..., script_22.pl
that outputs
output_1.txt, output_2.txt,..., output_22.txt
respectively.
What I'm trying to do now is write a script that will run all of the scripts (script_1.pl - script_22.pl) at the same time so I don't have to run all of them separately each time I update my files. The reason why they're all separate is because I don't know how to cycle through file names, and for each file name, assign a new output file. I'm hoping someone could help me with exactly this: a script that will read in all of the files at once, run the script for each file (it's one identical script), and for each file, print out a new output file, as listed above.
Edit: I figured I should include what I have right now. I do have something that works, but it still relies on the fact that I have the 22 separate scripts. What I've been doing is the following:
system("perl script_1.pl");
system("perl script_2.pl");
...
system("perl script_22.pl");
I want to be able to combine everything into one compact script. Any help would be greatly appreciated! Thanks in advance!
script_1.pl, it would be./script.pl file_1.txt output_1.txt