eric256 has asked for the wisdom of the Perl Monks concerning the following question:
I've got a project that I'm not sure how to attack. The question isn't specificaly perl, but the implementation is going to be perl sooo... there you have it.
Short story is I have a file with X's in it where information should be inserted. I'm going to have to look at the location of the X's in relation to a printed form I have to determine what goes where. So I would like to find some method of either filling in the existing "template" I was given OR produce a template that looks like it but with named feilds to fill in. So far so good and nice and easy. My only problem then is that many many of the feilds are single character feilds. I would like whatever template engine I use, and consequently whatever template, to look as close to the original as possible in the spaceing area. So single character feilds need to either have single digit names, or something else. I'm asking hoping someone with more experience with this kind of templateing will have help for me! Below is a sample of the "template" I was given for what its worth. I'm considering now building a seperate file with width based definitions of each line, but that will be hard to visualy tie back to my source document. Hopefully I haven't lost everyone at this point. Any help at all, even telling me to shut up and build a line by line definition, would be greatly appreciated.
XXXXXXXXXXXXXXX +XXXXXXX X X X X X X X XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXX X XX XX XX X X XXXXXXXXXXXXXXXX XXXX +XXXXX X XXXXXXXXXXXXXXXXXXXXXXXXX X X X X XXXXXXXXXXXXXXXXXXXXX +XXXX
P.S. yes I know it is a mess, but sometimes you just have to work with what you are given. ;)
___________
Eric Hodges
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Picking a Template Engine/Method
by holli (Abbot) on May 10, 2005 at 21:22 UTC | |
by eric256 (Parson) on May 10, 2005 at 21:23 UTC | |
Re: Picking a Template Engine/Method
by eric256 (Parson) on May 10, 2005 at 22:51 UTC | |
Re: Picking a Template Engine/Method
by DrWhy (Chaplain) on May 10, 2005 at 21:19 UTC | |
Re: Picking a Template Engine/Method
by dynamo (Chaplain) on May 10, 2005 at 21:24 UTC | |
by TheDamian (Vicar) on May 10, 2005 at 22:14 UTC | |
Re: Picking a Template Engine/Method
by holli (Abbot) on May 10, 2005 at 21:18 UTC | |
Re: Picking a Template Engine/Method
by Adrade (Pilgrim) on May 10, 2005 at 21:36 UTC | |
by Adrade (Pilgrim) on May 10, 2005 at 22:29 UTC |