TheChosenOne has asked for the wisdom of the Perl Monks concerning the following question:
What I want to do is add some parameters manually, because the next that depends on the previous state and not only on the current state (So I have to pass a parameter twice.).#!/usr/bin/perl use strict; use warnings; use CGI qw(:cgi-lib :standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); my $q = new CGI; print $q->header; print "<center>"; print $q->h1('Let\'s do something!'); print "</center>"; print $q->start_html(-title => 'Do something'); print $q->end_form; our %in; &ReadParse(%in); my @keys = keys %in; my @values = values %in; main(); sub main{ print "<center>"; my $q0 = new CGI; print $q0->start_form( -name => 'sniff_button', -method => 'POST', -enctype => &CGI::URL_ENCODED, ); print $q0->submit( -name => 'button', -value => 'Do something', ); print $q0->end_form; print "</center>"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Manually add parameters in perl cgi
by AppleFritter (Vicar) on Sep 05, 2014 at 18:26 UTC | |
|
Re: Manually add parameters in perl cgi
by zentara (Cardinal) on Sep 05, 2014 at 19:45 UTC | |
|
Re: Manually add parameters in perl cgi ( no ReadParse no CGI->Vars
by Anonymous Monk on Sep 05, 2014 at 20:07 UTC |