Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

AFter I submit my form and dispatch the query string i.e.
file:///H:/a.cgi?Anemone_colonial=2...
Is there any way to capture the query string and run 'a.cgi' locally?

Replies are listed 'Best First'.
Re: parse $ENV{'QUERY_STRING'}
by Anonymous Monk on Jun 30, 2017 at 13:11 UTC
      to continue:

      'a.cgi' would parse the query_string and update a database with the parsed values. Is it possible to process this locally (eg run a.cgi locally instead of on a remote web server)?

        If you are using CGI consider using the param method:

        my $q = CGI->new; my $name = $q->param('name'); warn $name;

        You can run this from the command line by passing parameters ./cgi.pl name=Derp.

        However if you want to run this without a web server do you really need to use CGI at all? Perhaps if you write a short explanation of what you're trying to achieve people can provide better advice. If you do need to write something for the web, consider using Mojoliciouis::Lite rather than CGI.