in reply to Parsing large text file with perl
What you're looking for is something like:
while (<FILE>) { chomp; my @data = split /\t/; # Do something with the line. }
Alternatively, you could pass the file to Text::xSV, which will do the parsing for you and hand you a line. You'll still have to keep track of whether you're dealing with a main line or an award history line, but you'd have to do that no matter what. (If you didn't, you wouldn't use Perl to solve the problem - you'd use an RDBMS tool.)
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
|
|---|