On 4 Mar 2012 05:03:55 -
Peter Scott wrote:
> On Fri, 02 Mar 2012 21:31:50 +0100, Manfred Lotz wrote:
> > Another question I have: Where do I find what '-|' means? I mean the
> > minus before the pipe char.
>
> perldoc -f open
>
>
Thanks, found it there.
--
Manfred
--
To unsubscribe
On Fri, 02 Mar 2012 21:31:50 +0100, Manfred Lotz wrote:
> Another question I have: Where do I find what '-|' means? I mean the
> minus before the pipe char.
perldoc -f open
--
Peter Scott
http://www.perlmedic.com/ http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=
Shlomi Fish wrote:
On 2 Mar 2012 02:48:28 -
Peter Scott wrote:
It doesn't have flaws. You could do it without the module with a piped
open:
sub run_cmd
{
my $cmd = shift;
open my $fh, '-|', "$cmd 2>&1" or die "open: $!";
print while<$fh>;
close $fh;
return $?>> 8;
}
I
Hi Peter,
On 2 Mar 2012 02:48:28 -
Peter Scott wrote:
> On Sun, 26 Feb 2012 20:30:56 +0100, Manfred Lotz wrote:
> > I want to run a shell command with the following constraints:
> >
> > a. I like to get the return code of the command b. Furthermore I want to
> > combine stdout and stderr so
Hi Peter,
Thanks for your reply.
On 2 Mar 2012 02:48:28 -
Peter Scott wrote:
>
> It doesn't have flaws. You could do it without the module with a
> piped open:
>
> sub run_cmd
> {
> my $cmd = shift;
>
> open my $fh, '-|', "$cmd 2>&1" or die "open: $!";
> print while <$fh>;
> clos
On Sun, 26 Feb 2012 20:30:56 +0100, Manfred Lotz wrote:
> I want to run a shell command with the following constraints:
>
> a. I like to get the return code of the command b. Furthermore I want to
> combine stdout and stderr so that the output comes in a natural sequence
> like in the shell. c. I