TarunMakhija
Programmer
Hi,
I am completely new to perl.. and I wanted to modify one code so that it runs over all the files in a directory.
So instead of running the perl script over individual files [input1.txt, input2.txt, input3.txt ....] to get out files [ou1.txt, out2.txt, out3.txt ....] in the following way:
perl delim.pl -in input1.txt -out out1
perl delim.pl -in input2.txt -out out2
perl delim.pl -in input3.txt -out out3
.
.
.
I want to write a FOR loop such that the code iterates over all the "input" text files [input1.txt, input2.txt, input3.txt...]in the specified directory and produces the corresponding "output" text file [out1.txt, out2.txt,....].
I have around 20,000 such files and hence I cannot do it manually - hence the question!
Can someone give me some code for this?
Looking forward to replies,
Thanks,
Tarun Makhija