use strict; use PDF::Template; my $rpt = new PDF::Template( FILENAME => 'sample.xml' ); my %Inputs = ( 'svctype' => 'Voice', 'fromcur' => 'EUR', 'LOOPDETAIL2' => [ { 'seqnum' => 878, 'date' => '01-Apr-2010', 'tax' => '0.000', 'posttax' => '0.000', 'pretax' => '0.000', 'israp' => 'FALSE' }, { 'seqnum' => 879, 'date' => '02-Apr-2010', 'tax' => '0.000', 'posttax' => '0.000', 'pretax' => '0.000', 'israp' => 'FALSE' }, { 'seqnum' => 880, 'date' => '03-Apr-2010', 'tax' => '0.000', 'posttax' => '0.000', 'pretax' => '0.000', 'israp' => 'FALSE' }, ], 'pretax_totals' => '0.000', 'tax_total' => '0.000', 'posttax_totals' => '0.000', ); $rpt->param(%Inputs); $rpt->write_file('/export/home/kars/sample.pdf');