Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: running a Perl script with options via HTML

by afoken (Abbot)
on Mar 21, 2014 at 18:12 UTC ( #1079320=note: print w/replies, xml ) Need Help??

in reply to running a Perl script with options via HTML

<form action="http://XXX/XXX/XXX/ -s server -u username -p password -v view -n name -a ip address" method="post">

This looks very wrong. CGIs aren't invoked that way. Parameters passed to the webserver inside the URL (the part after the first ?) are passed to the CGI via environment variables, Parameters passed to the webserver in POST requests are passed to the CGI via STDIN. CGIs do not take command line parameters.

Read, then consider using CGI or a similar module. Don't try do invent your own CGI protocol handler, you will likely create an incomplete and insecure version.


Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1079320]
[LanX]: so it was the will of the people to take back control
[LanX]: ;)
[marto]: and you still can't get a decent cup of tea in that town
[davies]: The turnout, IIRC, was about 12%.
[&lt; &amp; &gt;]: 12% seriously? =)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2017-12-15 19:09 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (442 votes). Check out past polls.