Check out example codes for "run bash command perl". It will help you in understanding the concepts better.

Code Example 1

system("sh", "script.sh", "--help" );

system("sh script.sh --help");

Learn ReactJs, React Native from akashmittal.com