Solved

query_string

Posted on 2000-04-08
10
230 Views
Last Modified: 2013-12-25
hi experts,
i don't know how to get the query_string
using CGI.pm (oo type)

/cgi-bin/show.cgi?hello

use CGI;
$qs = new CGI;
$any = $qs->param????

how about /cgi-bin/show.cgi?action=add&name=stanley&email=abc@xxx.com
??
please help
0
Comment
Question by:mwhuen
  • 5
  • 4
10 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 20 total points
ID: 2697264
($keywords) = $qs->param;
$any = $qs->param($keywords);
$query = $qs->query_string;
$action = $qs->param('action');
$name = $qs->param('name');
$email = $qs->param('email);
0
 

Expert Comment

by:stanleyhuen
ID: 2697644
thanks, but ozo can you explain more details to me,
what is meant by
($keywords) = $qs->param;
$any = $qs->param($keywords);

$query = $qs->query_string;
??
0
 
LVL 84

Expert Comment

by:ozo
ID: 2698131
$any = $qs->param($keywords); #gets 'hello'
$query = $qs->query_string; #gets 'action=add&name=stanley&email=abc%40xxx.com'
see
perldoc CGI
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:mwhuen
ID: 2700974
why the
()
in
($keywords)=$qs->param;
so important?
if i omit it, it can't show the result.
0
 
LVL 84

Expert Comment

by:ozo
ID: 2701007
the () causes $qs->param to be evaluated in list context instead of scalar context
0
 

Author Comment

by:mwhuen
ID: 2708594
Adjusted points from 5 to 20
0
 

Author Comment

by:mwhuen
ID: 2708595
sorry,
i am really new in programming,
what is list content and what is scalar context?
0
 
LVL 84

Expert Comment

by:ozo
ID: 2708654
see
perldoc perldata
0
 

Author Comment

by:mwhuen
ID: 2720535
besides run perldoc in unix shell,
where i can read perldoc?
i prefer web page perl doc
0
 
LVL 84

Expert Comment

by:ozo
ID: 2721023
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jQuery Generalization 3 69
Powershell / new-object PSObject rows 2 332
React or Angular? 6 71
how to pick specific file from ftp 13 56
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now