CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
open3 error

 



pdolinski
Novice

Sep 3, 2015, 7:10 AM

Post #1 of 2 (1004 views)
open3 error Can't Post

hi guys.
I am at a complete loss here. Here is my program in its entirety:

======
#!/usr/bin/perl

use strict;
use warnings;

use IPC::Open3;
use Symbol;

my ($o_in, $o_out, $o_err, $cmd) = (gensym (), gensym (), gensym (), "extprog");
my $pid = open3 ($o_in, $o_out, $o_err, $cmd) or print ("error at open3") and exit (1);
print ("\$! [$!]");
======

Output:
$! [Bad file descriptor]

What gives?

Thanks,
Pete


pdolinski
Novice

Sep 8, 2015, 12:44 PM

Post #2 of 2 (928 views)
Re: [pdolinski] open3 error [In reply to] Can't Post

I found it.
The Perl version that I am stuck using does not support the modern open3 syntax. It likes this:

open3 (*IN, *OUT, *ERR, $cmd)

All is well now.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives