artist has asked for the wisdom of the Perl Monks concerning the following question:
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) ABCThus XYZ.CO is converted into C and also removed etc..
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.while(<IN>) $line = new Format($_); $line->extractCompanyStuff; $line->convertCompanyStuff; $line->placeCompanyStuff_inDestinationFormat $line->printToDestination }
Thanks
Seeking art of structured conversion
an artist
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Format Conversion Structure
by BrowserUk (Patriarch) on Sep 10, 2002 at 00:46 UTC | |
|
Re: Format Conversion Structure
by Zaxo (Archbishop) on Sep 10, 2002 at 01:43 UTC |