in reply to Feeding data to external program

Perhaps you should look into IO::Tee since you are trying to write to two different filehandles at once.

The following is to be considered psuedocode since I don't have your full source code:

use IO::Tee; my $tee = IO::Tee->new("|$externalprogram",">>$log"); print $tee <<EOJ; (lines to send to external program) EOJ

Note: you may have to use it in conjunction with IO::File.

Replies are listed 'Best First'.
Re: Re: Feeding data to external program
by nimdokk (Vicar) on Jan 24, 2003 at 22:55 UTC
    Thanks, unfortunately, we don't have the IO modules loaded, may have to sweet talk the admin's into installing it if I can't get an effective workaround (we're using an older version of Perl 5). But at least I know I'm on the right track.