Re: trying to get line-by-line output of a command pipe in perl

2013-12-26 Thread Kenneth Wolcott
On Thu, Dec 26, 2013 at 5:34 PM, John W. Krahn wrote: > Kenneth Wolcott wrote: >> >> Hello; > > > Hello Kenneth, > > > >>I'm trying to obtain line-by-line output from a command pipe in perl. >> >>Unfortunately, I am firmly held to 5.8.8 version of perl on this >> specific machine :-( >> >>

Re: trying to get line-by-line output of a command pipe in perl

2013-12-23 Thread Shlomi Fish
Hi all, On Mon, 23 Dec 2013 18:48:24 -0500 Shawn H Corey wrote: > On Mon, 23 Dec 2013 15:02:13 -0800 > Kenneth Wolcott wrote: > > > open my $fh, @cmd, "|" or die "blah: $!\n"; fails, "Unknown open() > > mode '5'" > > If you use an array, it is _not_ sent thru the shell. Try the > three-argume

Re: trying to get line-by-line output of a command pipe in perl

2013-12-23 Thread Shawn H Corey
On Mon, 23 Dec 2013 15:02:13 -0800 Kenneth Wolcott wrote: > open my $fh, @cmd, "|" or die "blah: $!\n"; fails, "Unknown open() > mode '5'" If you use an array, it is _not_ sent thru the shell. Try the three-argument open: open my $fh, '-|', @cmd or die "blah: $!\n"; fails, "Unknown open()

trying to get line-by-line output of a command pipe in perl

2013-12-23 Thread Kenneth Wolcott
Hello; I'm trying to obtain line-by-line output from a command pipe in perl. Unfortunately, I am firmly held to 5.8.8 version of perl on this specific machine :-( Apparently, creating an array for my command prevents me from including the final pipe symbol when trying to use the three-argu