lalalala1 has asked for the wisdom of the Perl Monks concerning the following question:


I am new to perl, but eager to learn.

I want to extract data from a database with about 500 .txt files stored in one directory. All files contain data with the same structure. From every .txt file, I want the same information and store them in a new .txt file, in such a way that every line contains the data from 1 file. So my goal is to create a .txt file that I can use for data analysis.

For now I have the code that extracts data from one .txt file. What aproach would you suggest to use the same code on all of the .txt files to get the necessary data in one .txt file?

Thank you for your responses!