In reply-to Michael Fowler <[EMAIL PROTECTED]> on Mon Jul 9 13:06:42 2001
>On Mon, Jul 09, 2001 at 12:26:48PM +0100, [EMAIL PROTECTED] wrote:
>> I have a text file produced by another system. The fields are semi-colon
>> delimited, and the first line is a list of the fields, a header record,
>> also semi-colon delimited.
>
>You should investigate DBD::CSV. It has options for changing the delimiter,
>and already has support for determing column names based on the first line
>in the file.
>
Thanks, but I guess I am looking for more basic tips, as I am still learning core
Perl. So it is not so much that I want a solution, but I want to understand ways of
getting things done.
My current plan is to read the header line in, and then set up a variable for each
possible column, with its current column position in. I can do this with a split on
the header into an array, and then search the array for each column and note its
position.
This doesn't seem very Perl-like however.
Any better ideas?
------------------------------------------------
Global WebMail -
Delivered by Global Internet www.global.net.uk
------------------------------------------------