Call perl sub in html

October 15, 2009 at 13:18:00
Specs: Windows 98, ?
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?


See More: Call perl sub in html

Report •


#1
October 15, 2009 at 18:56:39
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
     }
}


Report •
Related Solutions


Ask Question