I have created a GUI using Perl CGI on which some buttons are there like "OFF" and "ON". And I have created a .pl file. The pl file is working perfectly fine when I run it on CLI. But when I program the buttons of the cgi file to call the pl file. It is not even opening on the GUI.
My approach is:
1. A cgi file is there. On which OFF/ON buttons are there.
2. A text file is there which has information of some certain parameters of a resource like: Name, IP, ON/OFF etc.
3. A change.pl file is there which when called will change ON/OFF parameter of a particular resource.
4. Now what I want is that when I call the ON/OFF button in front of a Resource named A, the change.pl file is called and then it will change the text.txt file by replacing ON to OFF or vice versa.
What I am able to do: When I call the button it prints the name of the resource and the value to be changed and value which I want to be used by change.pl and change the value in .txt file.'
But I not able to run the .pl file whenever a certain button is pressed.