My Perl script calls an external flashing tool and then parses its output. I have seen three ways to run a program: system("tool --port $port"), backticks, and exec. With system I get the output on the screen but cannot capture it, and my check system(...) or die "failed"; dies when the tool succeeds.
What is the difference between the three, and how do I get both the output and the exit code reliably?




