Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Input arrays to CGI

by Jazz (Curate)
on Jul 24, 2002 at 03:08 UTC ( #184680=note: print w/ replies, xml ) Need Help??


in reply to Input arrays to CGI

If you're using CGI.pm (and you should be when doing most CGI work), you can retrieve the list of all CGI parameters by using:

my @fields = param;

Or you can access a value individually by using:

my $single_item = param( 'item[123]' );

Or print out all params and their values by using:

print join br, map { "$_ = " . param( $_ ) } param();

If you're not using CGI.pm, you can do so easily by adding use CGI qw/ :standard /; at the top of your program. Documentation for CGI.pm is here.


Comment on Re: Input arrays to CGI
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://184680]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-07-28 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (197 votes), past polls