in reply to communicating with another program

Scalled down to the minimun. Only tested once to be sure it 'runs':

test1.pl
my $returned = `test2.pl aaa bbb ccc`; print "Got \"$returned\" from test2.pl\n"; exit;

test2.pl
foreach $line (@ARGV) { $input .= $line; } if ($input ne '') { print "We received input:\n$input"; } else { print "Error, no input received!"; } exit;

Replies are listed 'Best First'.
Re^2: communicating with another program
by twotone (Beadle) on Dec 01, 2005 at 04:25 UTC
    That does exactly what I need and is very simple. Thanks a bunch. :-)