in reply to Redirect output of the system() command
system( $config->{wkhtmltopdf_path}, @options, $source_file, $config-> +{result_filename}, ">/dev/null", "2>&1" );
Your problem is that you are passing a list to system and when system is passed a list it does not use the shell, but redirection (>/dev/null 2>&1) requires the shell so you have to put everything into a string:
system "$config->{wkhtmltopdf_path} @options $source_file $config->{re +sult_filename} >/dev/null 2>&1";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Redirect output of the system() command
by davido (Cardinal) on Jul 11, 2012 at 06:26 UTC | |
Re^2: Redirect output of the system() command
by Gangabass (Vicar) on Jul 11, 2012 at 08:52 UTC | |
by Anonymous Monk on Jul 11, 2012 at 09:18 UTC |
In Section
Seekers of Perl Wisdom