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.

In reply to To call a .pl file when a button is pressed on a GUI created using Perl CGI by pratibha.blr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.