I’ve been adding a plugin to an existing project, and the thing is tied together with a perl script. I’m trying to add my C program into the perl script to make an output file, but the output is garbage or missing.
My executable is called Interpolate and when it’s in the same folder as the perl script it’s working just fine
./Interpolate inv.tracking_log
Is how the command is run. It should produce an intermediate filecalled tmp.log, and a final file called out.txt. When I run it in the directory it does just fine, both files are as they should be.
So then I added a system call into the perl script (I barely (if that) know perl):
print("./Interpolate $inVideoFile"); //prints like the command (just a test)
my $interCall = system("./Interpolate $inVideoFile");
When running it from within the perl script, the tmp.log file is mostly garbage, and out.txt is missing entirely. I do realize out is most likely missing because it has a dependency on the tmp.log file. Is there a perl ‘gotchya’ that I’m missing somewhere?
should be
If you still have a problem after fixing that,
$inVideoFiledoesn’t contain what it should, or there’s a bug in your C program. (What is the return value of thesystemcall?)