renef has asked for the wisdom of the Perl Monks concerning the following question:
I'm an xBase programmer seeking enlightenment through Perl. I have a rather tedious data munge to deal with and I thought that this could be an opportunity to attempt to solve it using Perl. As a programmer, I understand the concepts and the variables etc., but I have yet to apply all that I have read in the Camel book. So, I thought that I would approach my task as a homework assignment. I don't want anyone to help me do it. I need directions to help me get there on my own.
I have a 3 column label format saved as a text file (10,000+ records)
last [comma] first last [comma] first last [comma] first address1 address1 address1 address2 address2 address2 city st [rt justify]zip city st [rt justify]zip city st [rt justify] + zip
(I hope that this mess looks ok when you see it.)
The whole point is that I need to create a *single column* listing from this 3 column list. The only constants that I have to work with on this 3 column report are:
The comma that can be used to id the name line
consistent spacing between labels/columns
the zipcode is in a specific position throughout the report
The only problem is address2 that is not consistent and adds a line if there is data in that field
As an xBase program, this is already licked. I would *rather* have any of you send me to some relevant Pattern Matching Tutorials and Loops tutorials that could help me unravel this on a nice, quiet Sunday morning with no one home but me and the humming of my computers (and Barry White on the CD player)
Thanks for your help.
-Rene Ferrer
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pattern Matching examples
by delirium (Chaplain) on Nov 23, 2003 at 16:54 UTC | |
by CountZero (Bishop) on Nov 23, 2003 at 19:36 UTC | |
by Anonymous Monk on Nov 24, 2003 at 14:31 UTC | |
by Anonymous Monk on Nov 25, 2003 at 05:33 UTC | |
|
Re: Pattern Matching examples
by duff (Parson) on Nov 23, 2003 at 17:44 UTC | |
|
Re: Pattern Matching examples
by CountZero (Bishop) on Nov 23, 2003 at 19:33 UTC | |
|
Re: Pattern Matching examples
by ysth (Canon) on Nov 23, 2003 at 19:00 UTC | |
|
Re: Pattern Matching examples
by jdporter (Paladin) on Nov 24, 2003 at 00:26 UTC | |
by Anonymous Monk on Nov 24, 2003 at 14:28 UTC |