Computing.Net > Forums > Web Development > Call perl sub in html

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Call perl sub in html

Reply to Message Icon

Name: DOS programmeR
Date: October 15, 2009 at 13:18:00 Pacific
OS: Windows 98
CPU/Ram: ?
Product: Compaq / ?
Subcategory: Perl
Tags: perl, subroutines, html, form
Comment:

Hi, I have a webpage that requires some if...elsif processing, but i'm at a dead end.  I need to call a perl subroutine in an html form.
This html form is written by a .pl page:
#!/cgi-bin
print "Content-type: text/html\n\n";
print <<HTML;
<html>
<head></head>
<body>
<form action="&INOPT">
<input type="text" name="d">
</form>
HTML

if ($d == "...")
{
# code
}

It does nothing. How can this be fixed?



Sponsored Link
Ads by Google

Response Number 1
Name: DOS programmeR
Date: October 15, 2009 at 18:56:39 Pacific
Reply:

Sorry, I forgot to to add something:

#!/cgi-bin

# default.pl - critical

print "Content-type: text/html\n\n";

print <<HTML;
     <html>
     <head></head>
     <body>
     <form action="&INOPT">
     <input type="text" name="d">
     </form>
     </body>
     </html>
HTML

sub INOPT
     if ($d == "...")
     {
          # code
     }
}


0
Reply to Message Icon

Related Posts

See More


PHP Script requried for R... how to setup live webcam ...


Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Call perl sub in html

Getting SQL in HTML? www.computing.net/answers/webdevel/getting-sql-in-html/223.html

magazine-style sidebars in HTML? www.computing.net/answers/webdevel/magazinestyle-sidebars-in-html/2368.html

Grammer in HTML www.computing.net/answers/webdevel/grammer-in-html/2195.html