I'm, trying to run a perl script from html, but I'm getting error during execution. Here is my html and 2 lines perl code. The error code is not very descriptive just says "Internal Server Error" and some other lines. I also want to know how to display the receive user name in the perl script.
pwd
/var/www/cgi-bin
ls -l
total 4
-rwxr-xr-x 1 root root 49 Aug 26 16:49 username.pl
Html Code:
<html>
<head>
</head>
<body>
<h1> Hello </h1>
<form action="/cgi-bin/username.pl" method="POST">
<input type="text" name="username">
<input type="submit">
</form>
</body>
</html>
Perl code:
#!/usr/bin/perl
print "Received user name is\n";