The command shell neither knows nor cares that a Java program is executing it. So your question is the wrong one. I would start by making sure that you didn't make a bad assumption about the current working directory of that script; if you did, you would have looked in the wrong place for the supposed output files and wouldn't have found them.
In particular you must handle 'stderr' (your failure to do so meant you did not see the error message saying the perl script could not be found) and you must either specify the current working directory so the the perl scipt is found or you must specify the full path to the perl script.
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.