well i simply can't ...
but if you really want't to get your shellpromt back use a fork for that process you would like to read from.

something like:

die unless defined ($spawn=fork());
unless ($spawn)
{
        open FH,"whoami |";
        while(<FH>)
        {
                print if /mnibble/;
        }
}

with regards
MNibble


Ken Killer wrote:
If I run the application A  from the command line, it will write some
output to screen  and continue running on the foreground.
Now, in my perl tool program,  I will call the application A and
collect some output of that application A. my perl program will be
used on Unix/Linux/Win32 system.

My program like this,  I don't close the filehandle FH, because I want
the appA to run at the background for ever.

open FH,"appA |";
my @result =<FH>; foreach (@result) { print $_ if m/patten/; }
But I don't get the expect as what I want,  my perl program never
exit, because  the appA is running.

how to fix my perl program?

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to