Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^6: Unwanted parameter when executing CGI scripts

by Nocturnus (Sexton)
on Jan 07, 2013 at 08:26 UTC ( #1011974=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Unwanted parameter when executing CGI scripts
in thread [SOLVED] Unwanted parameter when executing CGI scripts

Well, it might make sense, but it's not what I want. As I wrote above, the problem arose when I was trying to pass parameters from the query string to another script by constructing a link which contains these parameters. I used the following method (pseudocode):

In scriptA.pl, fill hash with all parameters from query string, using $q->url_param (and not $q->param) Do something with the hash entries Construct a new query string from the hash entries Generate a link to scriptB.pl?<new query string>

Now, I if call

/cgi-bin/scriptA.pl

(without any parameters), the resulting link is

/cgi-bin/scriptB.pl?keywords=

i.e. there is an empty parameter "keywords" in the link which should not be there.

This was not acceptable for me. Solving that problem turned out not to be too easy because I wanted to keep the "keywords" parameter if it had been in the query string in the first place.

See my post below for additional misbehavior of CGI.pm and for how I solved the problem.

Regards,

Nocturnus


Comment on Re^6: Unwanted parameter when executing CGI scripts
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2014-07-29 21:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (228 votes), past polls