Re: Generic output file
by choroba (Cardinal) on Jan 03, 2014 at 20:15 UTC
|
How is this question different from Creating generic format file? Specifically, you did not get much answers to the old one. What did you do to make the new question easier to answer?
| [reply] |
Re: Generic output file
by davido (Cardinal) on Jan 03, 2014 at 20:59 UTC
|
Consider how you would do it manually, and then get started working on an automated implementation that follows similar steps. Once you've gotten a good start on it, you can post sample input, sample output, and real code. At that point when or if you get stuck, your question will have the benefit of some code we can look at and help you with.
When you do post real code, be sure to follow Writeup Formatting Tips.
| [reply] |
Re: Generic output file
by taint (Chaplain) on Jan 03, 2014 at 20:10 UTC
|
Based on the title of your question, and the content of your post; I have no idea what the end result of what you're seeking should be. You would probably do well to read How do I post a question effectively?. Have you made any attempt to create your desired output? If so, what did you do? Can we see the product of your previous effort(s)? Your code? ...
I'm sorry, but without more input from you, rajiyengar. I don't think it's possible to provide a solution.
¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH
| [reply] |
Re: Generic output file
by aitap (Curate) on Jan 03, 2014 at 21:34 UTC
|
The most primitive way is the same as with shell scripts: write your config file in Perl and require (or do) it. You can also use an existing Config-related module or parse your arbitrary config files by hand (see open, I/O Operators, perlretut). | [reply] |
Re: Generic output file
by Laurent_R (Canon) on Jan 03, 2014 at 21:39 UTC
|
This is very difficult to understand and I tend to think it has to do, to a large extent, with poor formatting. I also think you should go to Writeup Formatting Tips to figure out how to format your questions, and reformat your post. As it looks now, it is difficult to figure out what is what, and I strongly suspect that you had new lines and other formating devices that became lost.
| [reply] |
Re: Generic output file
by boftx (Deacon) on Jan 03, 2014 at 23:47 UTC
|
In essence, this really isn't all that different from the topic discussed here just a few days ago. Anytime you start thinking in terms of generic procedures (a Good Thing(tm)) you almost always can follow the tangent that leads to polymorphism and objects. Granted, that might be over-complicating this issue, but it might be a good learning experience.
It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.
| [reply] |
Re: Generic output file
by Anonymous Monk on Jan 04, 2014 at 06:13 UTC
|
Hi,
Just a hint, I would probably use pack and unpack to do this.
But 'there is more than one way to do it'.
J.C.
| [reply] |