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

In reply to Picking a Template Engine/Method by eric256

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.