siffland has asked for the wisdom of the Perl Monks concerning the following question:
I have a document in the following format
=====EDO=FED00123===== XXXXX XXXXX XXXXX XXXXX XXXXX UNIX Page: XX =====EDO=FED00124===== XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX UNIX Page: XX
There can be any number of FED00XXX segments and all the X's can be different depending on the report information (there can be a varying amount of XXXXX lines form 5 to 50). I have comments i need to paste after the "UNIX Page: XX" line. I am pulling them from a sqlite database and the comments correspond with the FED00XXX number.
=====EDO=FED00123===== XXXXX XXXXX XXXXX XXXXX XXXXX UNIX Page: XX Comment FED00123 =====EDO=FED00124===== XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX UNIX Page: XX Comment FED00124
The database part is easy, i just have no idea how to search for the FED number and insert the comments (will be a variable in the script pulled from the database) after the "UNIX Page: XX" line following the FED number. The FED number is pulled from the database as variable $FED and the comment as $COMMENT.
Any help would be appreciated, if anything needs to be made more clear ask, i just did not know how to explain the problem.
Thanks Sean
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Paste comments in a document
by BrowserUk (Patriarch) on Apr 06, 2010 at 19:42 UTC | |
|
Re: Paste comments in a document
by ikegami (Patriarch) on Apr 06, 2010 at 19:34 UTC | |
|
Re: Paste comments in a document
by Anonymous Monk on Apr 06, 2010 at 19:32 UTC | |
by siffland (Novice) on Apr 06, 2010 at 22:16 UTC | |
by almut (Canon) on Apr 06, 2010 at 22:38 UTC | |
|
Re: Paste comments in a document
by siffland (Novice) on Apr 07, 2010 at 21:17 UTC | |
|
Re: Paste comments in a document
by 7stud (Deacon) on Apr 06, 2010 at 20:03 UTC |