in reply to logging of win32::process

Hi Rambo Welcome to Perlmonks;

To have the output of your process available inside your perl script you would need to open a pipe then read from that pipe. Like this:

use warnings; use strict; my $file= "capture.txt"; my $command= "ls"; open ( FILE, ">$file") or die "Can't open $file, stopped"; open ( PIPE, "$command |") or die "Can't open pipe, stopped"; while (<PIPE>) { print ; print FILE; }
Of course, this just opens $command as a child of your script. Giving you access to the output only. If you need to start a fully interactive process this is much harder. You might read perlipc.

ammended

See 'tee' with pipes for a command-line filter using this technique.


s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}