Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi All
I am trying to add paragraphs in between of the MS word document, have used search and replace method(means if a string is found then add paragraphs in place of that sring)
Below is the working copy of my code. Code is able to find the text on MS word document and then replace with the data to be inserted. But as the data to be inserted increases (means add 27.1.8 ERR_u8GetAllBothDtcCount1 one more line to data to be inserted) it doesnt add data to the MS word documentand replace string with '1'.
If I add the same data irrespective of its length at end or starting of the MS word document it adds correctly but in between of the document it is not able to add correctly.
Not able to know what problem is there. Please guide me.
use strict;my $data_to_be_inserted = '27.1.1 ERR_bDisableModeDetecting 27.1.2 ERR_bIsErrorActive 27.1.3 ERR_ClearAllErrorCodes 27.1.4 ERR_ClearPublicErrorCodes 27.1.5 ERR_InitializeRAMBuffer 27.1.6 ERR_ManageEepromWriting 27.1.7 ERR_u8GetAllBothDtcCount ';
Thanks
|
|---|