Example for generating a serial letter from a database |
use DBIx::Recordset ;
use Embperl ;
*set = DBIx::Recordset -> Search({'!DataSource' => $db, '!Table' => 'address', '!WriteMode' => 0}) ;
die DBIx::Recordset -> LastError if (DBIx::Recordset -> LastError) ;
Embperl::Execute ({'inputfile' => 'address.rtf', param => \@set, syntax => 'RTF'}) ; # if your database table contains fields 'name' and 'street' you can now simply insert a
# fields call 'name' and 'street' in your RTF file and Embperl will repeat the document
# until all records are outputed
|