in reply to system call for makefile
Without showing what exactly's in $MAKECOMMAND people are only going to be guessing, but your problems in your command that's getting passed to the shell not your perl. You may have a trailing semicolon, or another | on the end of it, or who knows what.
Another aid in debugging is to build what you're passing to system in a scalar and print that scalar's contents out so you know exactly what you're giving to the shell.
my $cmd = "$MAKECOMMAND | tee ..."; print STDERR "cmd: !!$cmd!!\n" if $DEBUGGING; my $ret = system( $cmd );
|
|---|