|
Prev: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.8 $)
Next: IPC::Open3 : Why can't I catch program output here?
From: J�rgen Exner on 4 May 2008 15:38 "Ela" <ela(a)yantai.org> wrote: >> Ela said: >>> When running the slave prog directly by perl slave.pl, something is >>> printed onto screen but >>> perl master.pl (master.pl call salve.pl by > system) >>> does not >#!/bin/sh > `perl slave.pl $dirname` Dude, you are _EXPLICITELY_ asking the shell to capture the output of the subprocess and you wonder why it isn't printed? > So how to solve? Maybe don't ask the shell to caputure the output? jue
From: Peter J. Holzer on 4 May 2008 15:37 On 2008-05-04 19:10, Jim Gibson <jimsgibson(a)gmail.com> wrote: > In article <fvkj8m$1pt$1(a)ijustice.itsc.cuhk.edu.hk>, Ela ><ela(a)yantai.org> wrote: >> #!/bin/sh >> `perl slave.pl $dirname` >> >> So how to solve? > > Send the output stream from your Perl program to STDOUT: > > #!/bin/sh > echo `perl slave.pl $dirname` Ouch! hp
From: Uri Guttman on 4 May 2008 16:15
>>>>> "JG" == Jim Gibson <jimsgibson(a)gmail.com> writes: >> >> #!/bin/sh >> `perl slave.pl $dirname` JG> Send the output stream from your Perl program to STDOUT: JG> #!/bin/sh JG> echo `perl slave.pl $dirname` useless use of echo. just drop the backticks as others have mentioned. uri -- Uri Guttman ------ uri(a)stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Free Perl Training --- http://perlhunter.com/college.html --------- --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- |