CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner: Re: [Norwegian_Wood] parse tab delimited file and write to new files: Edit Log

Veteran / Moderator

Jun 30, 2013, 8:30 AM

Views: 1300
Re: [Norwegian_Wood] parse tab delimited file and write to new files

Saying you're having "no success" is a very poor problem description and doesn't give us any info on what you're doing or the results you're getting.

What have you tried? You need to post your code.

What were the results?

How do the results differ from what you expected?

Did you receive any errors/warnings and if so what were they?

When you say you're trying to print to multiple files within the loop, are you saying you're trying to write to 3000 different files on each iteration of the loop?

I need to have the source data normalized before I import it.

That does not require creating 3000 separate files which then need to be parsed when inserting the data into the database.

You normalize the database structure/schema before anything else. Then as you parse each line of your source data, you either insert each record as needed, or if the record needs to be built up from multiple lines, you'd store the data in proper data structure, such as a hash, and do the insert(s) when the record has all of its data points.

BTW, creating 3000 tables with the exact same structure is far from being normalized.

(This post was edited by FishMonger on Jun 30, 2013, 8:32 AM)

Edit Log:
Post edited by FishMonger (Veteran) on Jun 30, 2013, 8:32 AM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives