On Dec 23, 2010 2:19 PM, "Chris Stinemetz" < cstinem...@cricketcommunications.com> wrote: > > Hello, > > I hope someone can help me. I am trying to parse data from a txt file and output the results to a new file with timestamp in the name of the file. > > The format of the txt file is ";" delimited and is several thousand records in length. Below is an example of the .txt format. >
look at Text::CSV(_XS) to parse it. You should even be able to store each in a hash with keys as the column names so that your code looks more readable. > > Ideally I would like to extract the following columns 0, 5, 44, 31, 32, and give them the following headers indicated below. > > > %fieldmap = ( > "Version" => 0, > "MType" => 5, > "RLPtxAT" => 44, > "Cell" => 31, > "Sector" => 32, > ); > Depending on what you're doing, you'll probably be better off using the variable that you assign Text::CSV when you new that up. > > Thank you, > > Chris > > >