[Wellington-pm] pass-through pipe?

Richard Hector richard at walnut.gen.nz
Sat Jul 17 21:30:41 PDT 2010


Hi all,

My question may well be unclear, because I may not understand the
problem.

I want to pipe the output of one command to the input of another - stuff
that's commonly done in the shell.

I could for example, use
system 'ls | sort';

but that, as I understand it, involves starting a shell.

It seems that it is cleaner, more efficient, and perhaps more secure,
though, to do such things as piped opens entirely within perl.

Is it possible to create an (unnamed) pipe to which I can connect both
processes, leaving perl out of the loop until the end? It would probably
be useful to be able to collect standard error and exit status from
each.

Thanks,
Richard




More information about the Wellington-pm mailing list