Thread: PERL & HTML

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    1
    Rep Power
    0

    Smile PERL & HTML


    Hello Community,

    Please can anyone provide me with a sample on how to call a perl file to execute from a html button.

    I am new to perl, and I tried this


    <html>


    <form action=name.pl method=post>
    Please click here:


    <input type=submit value="Press">
    </form>

    </body>
    </html>

    Thanks !!
  2. #2
  3. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,254
    Rep Power
    1810
    That's probably sufficient, though you may have to provide more information about where the script is located in the web server. It would usually be in the cgi-bin directory, which has been configured to allow perl scripts to execute.

    You also have to make sure the script has been given permission to execute.

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    	<meta charset="utf-8" />
    	<title>Form Test</title>
    </head>
    <body>
    <form action="cgi-bin/get_form.cgi" method="POST">
    Press me:
    <input type="submit" value="Press">
    </form>
    </body>
    </html>
    Last edited by keath; September 1st, 2013 at 09:58 AM. Reason: sp

IMN logo majestic logo threadwatch logo seochat tools logo