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
In reply to Pattern Matching examples by renef
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |