Home > Archive > PERL Miscellaneous > April 2005 > Newbie Help
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| shirazk@gmail.com 2005-04-27, 3:57 am |
| I want to know if there is a way to do this is perl
A sample of the data is:
field1,field2,"3232,34,56",field4,field5
and i need to convert it into three individual records:
field1,field2,3232,field4,field5
field1,field2,34,field4,field5
field1,field2,56,field4,field5
The field in quotes might contain many more or less entries, even at
times none.
Any help is greatly appreciated.
Thanks a lot.
| |
| Gunnar Hjalmarsson 2005-04-27, 3:57 am |
| shirazk@gmail.com wrote:
> I want to know if there is a way to do this is perl
> A sample of the data is:
>
> field1,field2,"3232,34,56",field4,field5
>
> and i need to convert it into three individual records:
>
> field1,field2,3232,field4,field5
> field1,field2,34,field4,field5
> field1,field2,56,field4,field5
>
> The field in quotes might contain many more or less entries, even at
> times none.
> Any help is greatly appreciated.
Yes, there are ways to do it in Perl.
You forgot to post the code you have so far; Without it it's hard to
help you. Please study the posting guidelines for this group:
http://mail.augustmail.com/~tadmc/c...guidelines.html
before posting the code.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
| |
| shirazk@gmail.com 2005-04-27, 3:57 am |
| I havent done any perl.. i am just starting... now that i know it is
doable, i will try to get some parsing code and post it in a day or
two.. can you tell me a particular command i should use some hint?
thanks for the fast reply and input
| |
| Rodney Rindels 2005-04-27, 3:57 am |
| shirazk@gmail.com wrote:
> I havent done any perl.. i am just starting... now that i know it is
> doable, i will try to get some parsing code and post it in a day or
> two.. can you tell me a particular command i should use some hint?
> thanks for the fast reply and input
>
You should probably start with the perlfaq's to get a general
understanding.
http://perldoc.perl.org
is a good place to start.
there are actually many ways to build your parser in perl. I would
suggest your start with understanding perls data types first.
http://perldoc.perl.org/perlfaq4.html
Welcome to one of the most exciting languages on Earth.
Rod
| |
|
|
|
|
|