> Are you SURE that there might be commas in the other fields? > I would hope that whoever made this file you're parsing would > have thought of this if they ever intended to later use the data.
Good point. But I have no way of verifying that. These CSV files are provided to me by an outside source. I don't know if I'll be able to pin anyone down on the "comma issue". And I've already gotten bad answers to other technical questions... My thinking was to code for the worse case, which is where the data might contain embedded commas. This way, I don't have to worry about it. My concern is with field #17 (the last item in the header). But the detail lines may contain >17 items. Assuming that there are never embedded commas in the data, everything in the detail from field 17 on should be considered as one group. But again, I can't make that assumption. One embedded comma earlier in the data will throw off the logic. richf -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>