I'm using Apache server on Fedora-20. I'm trying to run a perl-cgi program on my local server, but it's not working, I have attached my html and perl code.
html program:
<html>
<head><title>Demo</title>
</head>
<body>
<form action="/cgi-bin/fam.cgi" method="post">
<input type="text" name="username">
<input type="submit">
</form>
</body>
</html>
This ran properly and outputs:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "hello world\n";
But when I pass a parameter, it doesn't work.
#!usr/bin/perl -wT
use CGI;
my $username = param('username');
print header;
print start_html("Perl page");
print h2("hello $username");
print end_html;
I've already installed the cgi module. Any suggestions?