The stupid question is the question not asked | |
PerlMonks |
Re: Perl script to read a tab delimited text fileby maa (Pilgrim) |
on Apr 01, 2004 at 11:54 UTC ( [id://341595]=note: print w/replies, xml ) | Need Help?? |
I don't see what your problem is... if the records are "fixed width" (i.e. there are 8 fields per line) then just check for define'dness of $line4 which should be the id of the 2nd part of the record... then save that record however you were going to savr the previous one. You should note, however, that your code is only every going to save the last record you read as you have hard-coded the array/indices in your while loop. :-) Why don't you consider using a hash where the key is the numeric ID and the content is an anon array?
And have you actually tried your split on tab separated nothingness? HTH - Mark
In Section
Seekers of Perl Wisdom
|
|