[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

query_string

Posted on 2000-04-08
10
Medium Priority
?
236 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 80 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

 

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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

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…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Suggested Courses

649 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