Dear Monks

I have to convert the file from one format to another format. Source file contain free form text, and I have to extract the values for the fields, massage them and put in the destination file. For each line of entry in the source file there should be corresponding line in the destination file except source file contain certain things. There are some values in sourefile which is also used in the lines other than where they are etc etc.
Sample data

Source:|A|1|    ** ABC -XYZ.CO 
Destination: |A|1| ** (C) ABC
Thus XYZ.CO is converted into C and also removed etc..
Question: How should I set my classes and structures to perform the convesion if decided the object oriented way.
Currently I have
while(<IN>) $line = new Format($_); $line->extractCompanyStuff; $line->convertCompanyStuff; $line->placeCompanyStuff_inDestinationFormat $line->printToDestination }
There are 10-15 stuff like replaceCompanyStuff, and they are not this simple. They have variety of source and destination format etc, may be I am looking for something better.

Thanks
Seeking art of structured conversion
an artist


In reply to Format Conversion Structure by artist

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.