Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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.

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://981024]
[karlgoethebier]: thao4: Si tout le reste échoue demande en francais ;-) There are some French speaking monks in the monastry...
[erix]: weird: a dev version perl (perl-5.27.9) is released, but git doesn't contain a perl-5.27.10 yet
[karlgoethebier]: ...not me ;-)
[thao4]: I posted my question, Could you help me , Please ?
[thao4]: posted with the title :Replace a patern_2 in 30 lines from the line with the patern_1 founded
[Eily]: karlgoethebier but we're trying to stay hidden!

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2018-02-21 10:07 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (277 votes). Check out past polls.