in reply to Re^2: Generating sequence nos. for data
in thread Generating sequence nos. for data

Yes, that's exactly what my code does, presuming "A 100" is on one line, and "B 100" is on the next. You aren't formatting it more clearly than that, so I'm not sure what you mean unless you say more.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on Re^3: Generating sequence nos. for data

Replies are listed 'Best First'.
Re^4: Generating sequence nos. for data
by icg (Acolyte) on Jun 07, 2005 at 13:22 UTC
    The input file consists of more than 2000 lines with multiple records. A $$ indicates the start of the record. The record is split on the tag. A hash is populated with key being the tag and value being the data. Some fields within a record repeat in a well defined manner. For e.g. A 100, A 200, A 300, etc. But some fields repeat in a sequence. For e.g. C 100 D 200 E 500 C 400 D 500 E 1000, etc. The sequence number for such fields should be incremented for each such sequence. For e.g. C 100 seqno=1 D 200 seqno=1 E 500 seqno=1 C 400 seqno=2 D 500 seqno=2 E 1000 seqno=2 etc. Thank you, Gowtham