in reply to Re-formatting multi-line records

We've already shown you how to split these lines into fields. If you have problems with that, ask about that and post the code you've written so far. Please don't simply ask us to do your (presumably) for-pay work for you.

Here's a snippet of the solution I wrote:

s/^(\d\d)//; my $record_type = $1; ... s/^(\d+{5})//; $key = $1; ... my @fields = /^ (\d\d\.\d\d\.\d\d\d\d) # start date (\d\d\.\d\d\.\d\d\d\d) # end date (.{3}) # category (.{3}) # group ... /x; ...

Replies are listed 'Best First'.
Re^2: Re-formatting multi-line records
by pg (Canon) on Oct 25, 2004 at 00:19 UTC

    I agree with ikegami, by asking questions like this without any effort on your own side, you are not doing yourself a favor.

    What you really need to do now is to read a Perl book, and understand the basics. Focus on simple regexp, split() and substr().

    But you at least did one thing right, you picked Perl. Perl is perfect for this type of task. Or maybe someone picked it for you, but still a good choice.

      Thanks pg I am new to Perl and was pointed in Perl's direction to do the task. I am not a programmer which doesn't help. I have tried using split and substr, but the data position is not consistent for all records which doesn't help. Rather than waste your time I will do the fix manually in MS Excel.
Re^2: Re-formatting multi-line records
by Anonymous Monk on Oct 25, 2004 at 01:47 UTC
    Thanks Ikegami. I will post my attempts in the future in addition to providing a description. I am a novice so I felt my code would not be useful. I appreciate the feedback from you (and all Monks). will be making a donation.