in reply to
Re: How to run bash file from perl
in thread How to run bash file from perl
If it hangs, it probably needs input, in which case IPC::Open2 or IPC::Open3 and print to the input channel of the subprocess, close it and read the output. But you still need to know what it expects and what to expect back. Try running the command directly and saving sample I/O to files, e.g. stdin.dat stdout.dat and stderr.dat. Then use these files as a template for designing your program around open2 or open3.
hint; to save input to a file, use:
' | tee stdin.dat | command.sh args >stdout.dat 2>stderr.dat