in reply to Reading different format records from an ASCII file

If I space out the fields, I think the you'll see that there is no regularity in the number of fields:

C~3453 | Kelly |Horton | Jockey | 27 | $110,250.30 N~3912 | Tom |Cat | $10,345.10
Given the lack of regularity, you'd need to compensate for that in your split statement assignment, so that Tom's fourth field is equivalent to Kelly's sixth.

Replies are listed 'Best First'.
Re^2: Reading different format records from an ASCII file
by graff (Chancellor) on Jul 22, 2004 at 00:46 UTC
    The OP has this covered already. The difference in field layout is flagged by the initial character, and the OP's code already branches on that, doing a different split in each case.