in reply to Re^2: Unwanted parameter when executing CGI scripts
in thread [SOLVED] Unwanted parameter when executing CGI scripts
You needn't test for whether $ENV{QUERY_STRING} is defined or not, because undefined things automatically have zero length.
"CGI.pm then would generate a parameter "keywords=Test", and we would remove that parameter accordingly. But that would be only the half of the way: I think that "Test" in that case should be a KEY in the parameter list which has an empty (or undefined) value."
Then you could try something like:
for ($ENV{QUERY_STRING}) { $cgi->{param}{delete $cgi->{param}{keywords}} = "" if length && !/[&=]/; }
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Unwanted parameter when executing CGI scripts
by Nocturnus (Beadle) on Jan 05, 2013 at 16:30 UTC | |
by tobyink (Canon) on Jan 05, 2013 at 23:08 UTC | |
by Nocturnus (Beadle) on Jan 07, 2013 at 08:07 UTC |
In Section
Seekers of Perl Wisdom