Expand|Select|Wrap|Line Numbers
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
- <head>
- <title>If's in PERL </title>
- </head>
- <body>
- <form name = "if" method = "post" action = "https://outranet.scm.tees.ac.uk/users/d4028307/august/hwp/filetest.cgi">
- <input type = "text" name = "spinach">
- <input type = "submit" value = "Send Script">
- <input type = "reset" value = "Reset">
- </form>
- </body>
- </html>
This is the PERL script i want to use. However when i try it in my browser all I get is an internal server error. What am i missing, Can anyone help? Thank you.
Expand|Select|Wrap|Line Numbers
- #!/usr/bin/perl
- use CGI;
- my $food;
- $food = CGI::param ('spinach');
- if ($food eq 'spinach')
- {
- print ('Spinach is good for you so you get dessert')
- }
- else
- {
- print ('you don't get dessert');
- }