Assist is getting a perl CGI script running with IPC::Open3 module
$10-30 USD
Cancelado
Publicado hace casi 10 años
$10-30 USD
Pagado a la entrega
I have a perl CGI script running under apache on a linux machine and I need assistance in getting the script to run.
Here are the specs of the system:
linux: Linux version [login to view URL] (...) (gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC) ) #1 SMP Fri Oct 22 15:27:53 UTC 2010
perl: This is perl 5, version 12, subversion 2 (v5.12.2) built for i386-linux-thread-multi
Here is the script:
#!/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/cat ';
my $pid = open3(\*WRITER, \*READER, \*ERROR, $cmd) or die "could not run cmd : $cmd : $!";
print WRITER '/tmp/[login to view URL]' . "\n";
while( my $output = <READER> ) {
print "output-> $output<br />";
}
while(my $errout = <ERROR> ) {
print "err-> $errout<br />";
}
waitpid($pid, 0 ) or die "$!\n";
my $retval = $?;
print "retval-> $retval<br />";
print " </body>
</html>";
i can make this script runable........................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,