February 27th, 2013, 04:48 PM
Using the OpenOffice::OODoc module
Does anyone have any experience with this module??
I'm having a hard time trying to wrap my head around the syntax.
Namely the substituteText and replaceText parts.
Basically I want to read a list of names and addresses from a CSV or
OPen Office spreadsheet and put them in a .odt file.
I figured I start small and see if I could just replace some text in an .odt file, but after reading the docs on CPAN and trying it myself, i'n not suree if I understand how the syntax should be. specially the paragraph value $p, using the docs at OpenOffice::OODoc::Text
This is the error Im getting:
Name "main:" used only once: possible typo at ChangeName.pl line 8.
Use of uninitialized value in lc at /usr/local/share/perl/5.14.2/OpenOffice/OODoc/File.pm line 378.
This is the code I tried:
my $contact = "New Name";
my $doc = odfText(file => 'Thank_You_Testing.odt');
February 27th, 2013, 11:54 PM
Have you tried it to relocate from the .odt file? I guess there is remedy which prominently works for you..
February 27th, 2013, 11:56 PM
What do you mean 'relocate'?
February 28th, 2013, 01:17 AM
The warning tells you that the $p variable is used only once. This is likeky to be an error, since a variable should pr'=esumably be initialized at one place and used at another one (at least).
February 28th, 2013, 01:18 PM
Originally Posted by Laurent_R
This is where I didn't understand the docs on this module.
According to the docs the $p value is the paragraph variable, Or at least I think so.
Exactly what should the value of $p should be?
How do I assing a paragarph to the variable $p??