my $pathstr = join( '', $outputfiles, $invoice_data_ref{actual_invoice_id} );
my @cmdargs = ( 'java', '-jar', '/var/ww/helper_code/svg2pdf.jar',
"$pathstr/master*.svg", "$pathstr/master.pdf" );
print join( ' ', 'command_str:', @cmdargs ), "\n"; # optional - just to check
$report_failure = system( @cmdargs );
####
my @svg_names = ( qw/master01 master02 .../; # or whatever those names are
# … create those files ...
my $pathstr = join( '', $outputfiles, $invoice_data_ref{actual_invoice_id} );
my @cmdargs = qw/java -jar /var/ww/helper_code/svg2pdf.jar/;
push @cmdargs, "$pathstr/$_.svg" for ( @svg_names );
push @cmdargs, "$pathstr/master.pdf";
####
open( SH, '|-', '/bin/sh' ) or die "Can't open a shell: $!";
for my $iterator ( @whatever_set ) {
print SH "command line…\n"
}
close SH;