in reply to Running an application and capturing output

It doesn't appear that $log->info will act on $_ by default. Try explicitly passing $_ to it.

while(<APP>){ print; $log->info($_); }

Replies are listed 'Best First'.
Re^2: Running an application and capturing output
by Nesh (Beadle) on Jun 02, 2005 at 01:40 UTC
    I tried that also...but that was also giving the same error. The error looks like
    C:\Neshat\Perl-Scripts>perl captureexeoutput.pl Can't take log of 0 at captureexeoutput.pl line 8, <APP> line 1. FINDSTR: Write error The process tried to write to a nonexistent pipe. The process tried to write to a nonexistent pipe. The process tried to write to a nonexistent pipe. The process tried to write to a nonexistent pipe. The process tried to write to a nonexistent pipe. ^C^C C:\Neshat\Perl-Scripts>

      Do you have the $ sigil on your variable? It isn't in your example. log is a function. $log is the name of your Logger.

        Thanks a lot...that was really stupid of me...it has been a long day