my @options = qw( --orientation Landscape --load-error-handling ignore --page-size A3 --quiet ); $config->{wkhtmltopdf_path} =~ s{ }{\\ }g; $config->{result_filename} =~ s{ }{\\ }g; my $command = "(" . join(" ", $config->{wkhtmltopdf_path}, @options, $source_file, $config->{result_filename}) . ")"; system( "/bin/bash -c \"$command\" >/dev/null 2>&1" );