I was trying to execute a perl file from my java project. But was unable to execute it even though calling it directly from the browser.After several investigation, I found the below point to be undertaken while executing the perl file from Java project in eclipse.
1) The perl file should be placed inside the cgi folder inside WEB-INF folder i.e /WEB-INF/CGI/your perl file.
2) The permission of the perl file should or say must be 755 i.e the command you have to execute on terminal or Dos prompt be : chmod 755 yourperlfile
Now you can call your perl file in browser or in your program and it will execute smoothly.
Hope this will save your time.