Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: CGI: List all params

by Anonymous Monk
on Mar 01, 2011 at 07:07 UTC ( [id://890694]=note: print w/replies, xml ) Need Help??


in reply to Re: CGI: List all params
in thread CGI: List all params

Could you explain how we can "proceed to fetch the values one by one"? All I can do right now is just get the list of the variables...but I can't actually get their values. Sorry to reply to such an old post. Thank you in advance!

Replies are listed 'Best First'.
Re^3: CGI: List all params
by Anonymous Monk on Mar 01, 2011 at 07:32 UTC
    but I can't actually get their values. Sorry to reply to such an old post. Thank you in advance!

    That is because you skipped the requisite reading step. CGI. Basically, you give param an argument, it returns values.

      my $query = CGI->new; my @names = $query->param; foreach my $name (@names) { print $name . ' => ' . param($name) . "<BR />\n"; } print "<P>\n";
Re^3: CGI: List all params
by Anonymous Monk on Jun 27, 2012 at 20:07 UTC
    foreach $name ( @names ) { if ( $name =~ /\_/ ) { next; } else { print "

    ".$name."\t=\t".$query->param($name) . "

    \n"; } some thing like this you can do

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-04-23 14:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found