Thanks a lot.
Now I want to take this to the next level. We get files from vendors in different format for a product and I want to transform them to one output format.
Output file:
Ocol1, Ocol2, Ocol3, Ocol4, Ocol5, Ocol6, Ocol7, Ocol8, Ocol9, Ocol10.
Vendor files:
Vendor1:
Vcol1, Vcol2, Vcol3, Vcol4, Vcol5, Vcol6
Source-target mapping:
Vcol1->Ocol1
Vcol3->Ocol2
Vcol4->Ocol4
Vcol5->Ocol8
Vendor2:
Vcol1, Vcol2, Vcol3, Vcol4, Vcol5, Vcol6, Vcol12, Vcol15
Source-target mapping:
Vcol1->Ocol12
Vcol3->Ocol2
Vcol4->Ocol15
Vcol5->Ocol8
I want to define input/output/source-target mapping in config files and want to write a generic perl program that reads the config files and generates output file.
In the case of shell script, I can create config files and include them in my script.
Would really appreciate some pointers here.
Thanks a lot
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.