<?xml version="1.0" encoding="windows-1252"?>
<node id="1003832" title="Using perl to extract data from multiple .txt files" created="2012-11-14 10:24:03" updated="2012-11-14 10:24:03">
<type id="115">
perlquestion</type>
<author id="1003829">
lalalala1</author>
<data>
<field name="doctext">
Hi,&lt;p&gt;

I am new to perl, but eager to learn.&lt;p&gt;
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.&lt;p&gt;
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?

&lt;p&gt;Thank you for your responses!</field>
</data>
</node>
