in reply to Parsing .txt into arrays

Hello Fshah

Welcome to the monastery gates and into the beautiful world of Perl.

Given from your sample of data this looks like DB data. Are you sure you want to export them into text files?

Through a very simple script you can export only the required fields and data from your database. Is this something that you would like?

It is very common that all of us we are trying to do something that some times is more complicated, try to describe in simple words how are you data populated into your txt files, is it through a Data Base? If this is the case then you should not be doing something like that. :D

Just describe what you are trying to do, Monks here are very friendly and very very experienced, they/we will try to assist as much as possible.

Looking forward to your update.

Hope this helps.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^2: Parsing .txt into arrays
by Fshah (Initiate) on May 25, 2017 at 04:13 UTC
    hello thanos1983,

    this is a sample data I made up looking at the format of the original data, the original data is simply a txt file from unknown source so all I have is this txt file and I want to populate my arrays with name as the heading appearing in the table and the contents as the columns pertaining to the heading ,eg: for work and language table, I want an array(with name "languages")and its contents as

    $languages[1]=english $languages[2]=spanish $languages[3]=italian