in reply to Re^2: Extraction help.
in thread Extraction help.
I'm missing quite a few lines.
The code and data you posted does not miss anything , so without a demonstration of the problem, there is nothing much we can do to help, other than offer you Basic debugging checklist and brian's Guide to Solving Any Perl Problem
I think CountZero is right, you should be writing two/three programs, one to import that data into sqlite database, which complains LOUDLY about skipping/missing stuff
Then another to query the database and format some output
You can see an (imperfect) example of the idea at Re: Open multiple file handles? , I'm sure more can be found site:perlmonks.org DBI csv, site:perlmonks.org DBI csv sqlite --- like Re: compare data between two files using Perl