I am having a Perl and a CGI file through which I want to fetch data from database. I've a UI where I am trying to use AJAX call which will hit the perl (.pl) or (.cgi) file and get the response in JSON. I've checked the perl/cgi file by running through command prompt and it works fine. This is how I am running my code in command prompt:
D:\>PerlExecutables\strawberry_32\perl\bin\perl.exe C:\Users\UserXYZ\Desktop\PerlExamples\test.cgi
The reason is I cannot do any kind of installation on my machine and also I don't want to run it through server like Apache or IIS.
How can this be achieved? Is there any way to make the script work in AJAX by passing the perl.exe path for execution or Any other alternatives?
Thanks!
use HTTP::Daemonfor server and as soon as I run the fileserver.plfromcmdsomething happens that make command prompt non-editable which I probably think is a server start. I've also printed the url and port number which are used to call that server. But, when I try to open browser and run the URL with port number I am gettingError 403 : The website declined to show this webpage. Am I missing something?