in reply to Re: perl wkhtmltopdf Error: Unable to write to destination
in thread perl wkhtmltopdf Error: Unable to write to destination
Thank you for your response.
I will try it with IPC::Open3.
I'm trying to create a simple example for IPC::Open3. Should I create a separate post relating to getting Open3 to work?
Below is code I am trying and here is the output I get:
OUTPUT:CODE:err-> /bin/ls: write error: Bad file descriptor retval-> 512
#!/usr/bin/perl use warnings; use strict; use IPC::Open3; print "Content-type: text/html\n\n"; print ' <!DOCTYPE HTML> <html lang="en"> <head> <title>IPC::Open3 Example</title> </head> <body>'; my $cmd = '/bin/ls -la'; my $pid = open3(\*WRITER, \*READER, \*ERROR, $cmd); while( my $output = <READER> ) { print "output-> $output\n"; } while(my $errout = <ERROR> ) { print "err-> $errout\n"; } waitpid($pid, 0 ) or die "$!\n"; my $retval = $?; print "retval-> $retval\n"; print " </body> </html>";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: perl wkhtmltopdf Error: Unable to write to destination
by djlerman (Beadle) on May 09, 2014 at 18:25 UTC |