vikee has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I have problems with parsing data, can anybody help me: this is the data structure:
I need to separate them to a two dimensional array of strings like:COLUMN_A: "Y","N" COLUMN_B: COLUMN_C: "something", "something else", "and more" ...
the problem is, that i need to get rid of the colon, the commas, and the "".@array[0][0] = "COLUMN_A"; @array[0][1] = "Y"; @array[0][2] = "N"; @array[1][0] = "COLUMN_B" @array[2][0] = "COLUMN_C" @array[2][1] = "something" @array[3][2] = "something else" @array[3][3] = "and more"
the line begins with the column name, before can be whitespaces what i don't need. then the parameters separated by commas, i don't need the "" too. so as in the example above. there can be from 0 to undefined params.
I'm a beginner, so help me, please.
Edited by Chady -- removed <pre> tags, fixed formatting.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: data parsing
by davorg (Chancellor) on Jul 21, 2004 at 14:49 UTC | |
|
Re: data parsing
by jZed (Prior) on Jul 21, 2004 at 16:13 UTC | |
by davorg (Chancellor) on Jul 22, 2004 at 08:34 UTC | |
|
Re: data parsing
by pbeckingham (Parson) on Jul 21, 2004 at 14:58 UTC | |
|
Re: data parsing
by murugu (Curate) on Jul 22, 2004 at 04:05 UTC | |
|
Re: data parsing
by xorl (Deacon) on Jul 21, 2004 at 15:29 UTC | |
by davorg (Chancellor) on Jul 22, 2004 at 08:33 UTC |