Solved

query_string

Posted on 2000-04-08
10
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
DevOps Toolchain Recommendations

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

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

763 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