in reply to Using CGI param method
#!/usr/bin/perl -Tw use strict; use CGI; our $q = CGI->new(); our %FORM; sub parse_form { # Get the input foreach my $p ($q->param()) { $FORM{$p}=$q->param($p); } } parse_form(); print "Content-type: text/plain\n\n"; while(my($k,$v)=each(%FORM)) { print "$k: $v\n"; }
Updated: Fix error (shouldn't use both :standard and create a CGI object) and add enough code to make this a complete, testable program.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using CGI param method
by Belgarion (Chaplain) on Apr 20, 2004 at 17:03 UTC | |
by sgifford (Prior) on Apr 20, 2004 at 17:51 UTC | |
|
Re: Re: Using CGI param method
by TilRMan (Friar) on Apr 21, 2004 at 05:24 UTC | |
|
Re: Re: Using CGI param method
by Anonymous Monk on Apr 20, 2004 at 17:43 UTC | |
by sgifford (Prior) on Apr 20, 2004 at 17:53 UTC | |
by Anonymous Monk on Apr 21, 2004 at 11:50 UTC | |
by sgifford (Prior) on Apr 21, 2004 at 15:12 UTC |