Creating an OpenOffice document in Perl

·

After installing OpenOffice::OODoc from CPAN, creating an OpenOffice (Writer) document is as simple as


#!/usr/bin/env perl
use OpenOffice::OODoc;
my $document = ooDocument (file => 'example.sxw', create => 'text');
$document->appendParagraph(text => "A paragraph");
$document->save;