in reply to Re^4: Parsing large text file with perl
in thread Parsing large text file with perl

Something like this:
push @{$hash{$vendor}{$history_row}}, @fields;
from my original suggestion. That's all you have to do! That one is a hash of a hash of arrays. The for loop at the end demonstrated how you would unroll it.

Have a look at perldsc and perllol. You will see how to build complex data structures like the one above and adapt it. Once you get the hang of it is very easy to use.

Extracting and reporting is perl's bread and butter! Have a look at the docs, see how I built my structure and have a go at adapting it.

If you get stuck come back.

btw I would get advice on that unpack! Ask another question. If it gets out I'm giving advice like that I'll be excommuncated!

Replies are listed 'Best First'.
Re^6: Parsing large text file with perl
by Anonymous Monk on Sep 03, 2004 at 10:32 UTC
    Thanks again, I will ask.