Re: IPC::Open3 and output

2017-07-10 Thread Chas. Owens
I don't think I understand what you are saying. Neither provides data to perl until you read from $file; however, it is important to note that the results of the two functions are not the same. The filehandle resulting from the open contains both STDOUT and STDERR from the command (due to the shel

Re: IPC::Open3 and output

2017-07-10 Thread Mike Martin
Thanks for that, now I have another issue. Unlike a piped open, open 3 does not seem to produce output immediately Is there any way to use pipes with open3 so that the FH has content before looping ie: this produces output my $pid=open($file, "-|","$cmd{$sopts->{subname}} 2>&1") while $pid=open3

Re: IPC::Open3 and output

2017-07-09 Thread Chas. Owens
On Sun, Jul 9, 2017, 19:37 Mike Martin wrote: > Hi > I am trying to use Open3 to capture stderr and avoiding the shell ie: > my $str="-v 35 -i /data/Downloads/testinput.mp4 -c:v libx264 -preset fast > -crf 28 -g 25 -c:a libmp3lame -b:a 128000 -threads 4 -af volume=2.5 -vf > scale='352:trunc(o

Re: IPC::Open3 Usage

2013-03-22 Thread Brandon McCaig
On Thu, Mar 21, 2013 at 11:12:54PM +0100, Dominik Danter wrote: > Hi I just don't understand the perlfaq example. All I want is to capture > output > of an external command's stdout and stderr. Here is what I've tried: > > sub get_exit() { Careful with those parens. You may not realize, but that

Re: IPC::Open3 Usage

2013-03-21 Thread Charles DeRykus
On Thu, Mar 21, 2013 at 6:41 PM, Charles DeRykus wrote: > On Thu, Mar 21, 2013 at 3:12 PM, Dominik Danter wrote: >> Hi I just don't understand the perlfaq example. All I want is to capture >> output >> of an external command's stdout and stderr. Here is what I've tried: >> >> >> sub get_exit() {

Re: ipc question

2011-12-16 Thread thebarn...@gmail.com
On Dec 14, 6:42 pm, oiss...@gmail.com (Tessio Fechine) wrote: > Hello, > I have a cgi application that has a two way communication with a ldap > application via open2: > > |home.cgi|  <===>  |ldap.pl| > > I need to keep communicating with the same ldap.pl process as other cgi > scripts are launched

Re: ipc question

2011-12-15 Thread Peter Scott
On Wed, 14 Dec 2011 20:42:10 -0300, Tessio Fechine wrote: > I have a cgi application that has a two way communication with a ldap > application via open2: > > I need to keep communicating with the same ldap.pl process as other cgi > scripts are launched: Sounds like you want a named pipe. -- Pe

Re: ipc question

2011-12-14 Thread Shlomi Fish
On Wed, 14 Dec 2011 20:42:10 -0300 Tessio Fechine wrote: > Hello, > I have a cgi application that has a two way communication with a ldap > application via open2: > > |home.cgi| <===> |ldap.pl| > > > I need to keep communicating with the same ldap.pl process as other cgi > scripts are launch

Re: IPC::Shareable issue

2011-01-11 Thread André
Hello, My problem was that I was creating the SM variable and after a bit the app was killing the current process witch destroyed the variable. Sorry (very long script), and thanks for your help. FR On Mon, Jan 10, 2011 at 12:38 PM, Michiel Beijen wrote: > Hi, > > I guess you should not really

Re: IPC::Shareable issue

2011-01-10 Thread Michiel Beijen
Hi, I guess you should not really use IPC::Shareable, it's last release was ages ago. It does not succeed tests on a 5.10.x perl: https://rt.cpan.org/Public/Bug/Display.html?id=41401 - and I guess the patch in this bug report will get it working for you again. I guess it would be worthwile findin

Re: ipc::run

2010-07-08 Thread C.DeRykus
On Jul 4, 5:59 pm, knowsuperunkn...@gmail.com (Unknown User) wrote: > Hi all, > > I have written a script that uses ipc::run on an array, like this, > based on a previous post here: > > m...@host101: cat ipc > #!/usr/bin/perl -w > use strict; > use IPC::Run qw/run/; > my (@hosts,@cmd,$task); > @hos

Re: ipc::run

2010-07-08 Thread C.DeRykus
On Jul 4, 5:59 pm, knowsuperunkn...@gmail.com (Unknown User) wrote: > Hi all, > > I have written a script that uses ipc::run on an array, like this, > based on a previous post here: > > m...@host101: cat ipc > #!/usr/bin/perl -w > use strict; > use IPC::Run qw/run/; > my (@hosts,@cmd,$task); > @hos

Re: ipc::run (but most probably IPC::Run)

2010-07-08 Thread Dr.Ruud
Unknown User wrote: I have written a script that uses ipc::run on an array, like this, based on a previous post here: I see no usage of "ipc::run" there, did you maybe mean "IPC::Run"? m...@host101: cat ipc #!/usr/bin/perl -w use strict; use IPC::Run qw/run/; my (@hosts,@cmd,$task); @hosts

Re: ipc::run

2010-07-06 Thread Shlomi Fish
On Monday 05 Jul 2010 03:59:26 Unknown User wrote: > Hi all, > > I have written a script that uses ipc::run on an array, like this, > based on a previous post here: > > m...@host101: cat ipc > #!/usr/bin/perl -w > use strict; > use IPC::Run qw/run/; > my (@hosts,@cmd,$task); > @hosts = qw/localho

Re: IPC::Open2 and mod_perl

2008-08-03 Thread Jeff Pang
Hello, Since this is most likely a modperl question, I suggest you'd better ask it to modperl list: http://lists.cpan.org/showlist.cgi?name=modperl-user Good luck! Ryan 写道: > I'm trying to do this under mod_perl2: > > use IPC::Open2; > my $pid = open2(*CHLD_OUT, *CHLD_IN, '/usr/local/bin/princ

Re: while(1) or redo [was: Re: IPC problem]

2007-02-07 Thread Adriano Ferreira
On 2/7/07, Rob Dixon <[EMAIL PROTECTED]> wrote: Igor Sutton wrote: > Hi fellows, > >> Dave, you wanted to use >> >> while (1) { >> ... >> the code to be repeated >> .. >> } >> > > The above code could be written like this: > > { >... ># the code to be repeated >... >redo; >

Re: while(1) or redo [was: Re: IPC problem]

2007-02-07 Thread Rob Dixon
Igor Sutton wrote: Hi fellows, Dave, you wanted to use while (1) { ... the code to be repeated .. } The above code could be written like this: { ... # the code to be repeated ... redo; } Do you think this is better or worse than the other idiom? I like the last more.

while(1) or redo [was: Re: IPC problem]

2007-02-05 Thread Igor Sutton
Hi fellows, Dave, you wanted to use while (1) { ... the code to be repeated .. } The above code could be written like this: { ... # the code to be repeated ... redo; } Do you think this is better or worse than the other idiom? I like the last more. -- Igor Sutton Lope

Re: IPC problem

2007-02-05 Thread Jenda Krynicky
From: "Tom Phoenix" <[EMAIL PROTECTED]> > On 2/2/07, Gauthier, Dave <[EMAIL PROTECTED]> wrote: > > > print WR "2"; > > What, you didn't put a newline on the end of the line? Your client is > reading lines, isn't it? > > > goto top; > > Excuse me; I feel unwell. Search the net for "goto consider

Re: IPC problem

2007-02-02 Thread Tom Phoenix
On 2/2/07, Gauthier, Dave <[EMAIL PROTECTED]> wrote: print WR "2"; What, you didn't put a newline on the end of the line? Your client is reading lines, isn't it? goto top; Excuse me; I feel unwell. Search the net for "goto considered harmful" -- or at least, consider it harmful. Cheers!

RE: IPC with parent from mutiple children

2003-06-27 Thread Lodewijks, Jeroen
I think I have found the problem. It turns out that the closing and opening of the pipe is in the wrong place. This code actually works: #!/bin/env perl # use strict; use FileHandle; # Global variables; my $child = 0; my $max_child = 60; # --- Sub routines

RE: IPC

2002-01-18 Thread Bob Showalter
> -Original Message- > From: Ryan Guy [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 18, 2002 9:20 AM > To: '[EMAIL PROTECTED]' > Subject: IPC > > > I was wondering if anyone could point me in the direction of > a good perl ipc > tutorial (other than perldoc). Also any perlscript s

Re: IPC Question

2001-11-04 Thread nafiseh saberi
I think... you should choose another name for filehandler... it is a reserved world. _ Best regards Try to always be hopefull www.iraninfocenter.net www.electronegar.com www.sorna.net __

Re: IPC::Open3

2001-06-20 Thread Michael Fowler
On Wed, Jun 20, 2001 at 11:26:32AM -0700, Paul Burkett wrote: > Basically I'm suppose to be able to change the cameras > which are displayed on the webpage. Right now I can > change the cameras displayed on the webpage by > accessing Tip and typing in a command like '@01' (any > value through @01-

Re: IPC::Open3

2001-06-20 Thread Paul Burkett
Basically I'm suppose to be able to change the cameras which are displayed on the webpage. Right now I can change the cameras displayed on the webpage by accessing Tip and typing in a command like '@01' (any value through @01-@16) also you can type in '@22' (any value through @22-@44) and it will

Re: IPC::Open3

2001-06-20 Thread Michael Fowler
On Wed, Jun 20, 2001 at 11:06:19AM -0700, Paul Burkett wrote: > He do you or anybody know of a program like TIP > (creates a terminal connection to a remote host) that > will work in Perl, right now all I get is "tip:must be > interactive", thanks. What's giving you this error message? If you're

Re: IPC::Open3

2001-06-20 Thread Paul Burkett
heh, thanks that might explain why it is working, I'm just using last ditch efforts to get this thing to work. He do you or anybody know of a program like TIP (creates a terminal connection to a remote host) that will work in Perl, right now all I get is "tip:must be interactive", thanks. > On We

Re: IPC::Open3

2001-06-20 Thread Michael Fowler
On Wed, Jun 20, 2001 at 09:59:38AM -0700, Paul Burkett wrote: > As a last ditch effort to get this serial device to > write I found a Perl module called "IPC::Open3" it > seems to have the ability to write to a serial device. I'm not sure where you got this idea. IPC::Open3 is for reading and wr