Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I've tried to use "-|" pipe option on "perl v5.8.4 built for MSWin32-x86-multi-thread" as below :
Then, perl returnsuse strict; use warnings; use threads; #sub sub1{- my $pid = open(HCIDUMP, "-|"); defined($pid) || die "can't fork: $!"; if($pid){ while(<HCIDUMP>){ my $test = readline(<HCIDUMP>); print "this is priting from open - $test\n"; } close(HCIDUMP); }else{ exec("sdb shell hcidump") || die "can't exec program: $!"; }
Is this usage wrong or just not working in window?"'-' is not recognized as an internal or external command,operable pro +gram or batch file."
Thanks Br
David Lim
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "- |" pipe option doesn't work
by Corion (Patriarch) on Jan 09, 2017 at 15:22 UTC | |
by BrowserUk (Patriarch) on Jan 09, 2017 at 16:29 UTC | |
by Corion (Patriarch) on Jan 09, 2017 at 17:10 UTC | |
by BrowserUk (Patriarch) on Jan 09, 2017 at 18:13 UTC | |
by choroba (Cardinal) on Jan 09, 2017 at 16:37 UTC | |
by DavidLim (Initiate) on Jan 09, 2017 at 15:30 UTC | |
by Corion (Patriarch) on Jan 09, 2017 at 15:34 UTC | |
|
Re: "- |" pipe option doesn't work (updated)
by haukex (Archbishop) on Jan 09, 2017 at 15:30 UTC |