0

I'm having some difficulty creating an HTML front-end for a Perl script we use in-house for config generation. We've moved from a Linux system to a Windows server instance and I've tested CGI/Perl are working as expected. The script itself uses the following format:

my $unitname; #name of device
my $clientid; #name of client
my $version;  #version of device firmware

These variables are called via command line, which prints the config to the cli:

./confgen.pl -u "unitname" -c "clientid" -v "version"

What I am trying to acheive is to use the existing variables in an HTML Form, but am not having any luck. So far I have this:

<form action confgen.pl method "get">
    <input type="text" name="unitname">
    <input type="text" name="clientid">
    <input type="text" name="version">
    <input type="submit" Value="generate"
</form>

Any advice or examples? I should add that CGI and Perl aren't my first languages, but I've been trying my best.

1
  • 1
    that can't be how your script looks; how does it read the command-line arguments? also your HTML is missing some = and a >. Commented Mar 1, 2013 at 1:08

1 Answer 1

1

Your HTML should be like this

<form action="confgen.pl" method="get">
    <input type="text" name="unitname">
    <input type="text" name="clientid">
    <input type="text" name="version">
    <input type="submit" value="generate">
</form>

are you using any Perl library to receive the HTTP request? Consider using CGI http://perldoc.perl.org/CGI.html

Sign up to request clarification or add additional context in comments.

1 Comment

that link is, as its name says, about sending an HTTP request from Perl, not receiving one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.