Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Redirect output of the system() command

by ikegami (Pope)
on Jul 11, 2012 at 06:27 UTC ( #981024=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Redirect output of the system() command
in thread Redirect output of the system() command

You never invoked a shell because you didn't pass a shell command to system

You want

system('sh' => ( '-c' => '"$@" >/dev/null 2>&1', '--', $config->{wkhtmltopdf_path}, @options, $source_file, $config->{result_filename}, ));

This approach handles spaces and other special characters in file names and options.


Comment on Re^3: Redirect output of the system() command
Select or Download Code
Re^4: Redirect output of the system() command
by Gangabass (Vicar) on Jul 11, 2012 at 07:59 UTC
    Same error as before (I'm sure wkhtmltopdf just grab all arguments): Error: Failed loading page http: (sometimes it will work just to ignore this error with --load-error-handling ignore)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://981024]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2015-07-07 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (86 votes), past polls