It was Thursday, June 19, 2003 when Dan Muey took the soap box, saying:
: Hello list,
:
: I have a probably simple thing.
:
: I'd like to basically do:
:
: use CGI qw(:standard);
: my $q = query_string();
:
: Except I need to remove two params from it:
:
: So if $q above is : hi=bye&love=hate&one=two&etc=etc
: I want to remove, say 'love', so it'd be: hi=bye&one=two&etc=etc
:
: I know I could do a regex but I'd like a CGI way to do
: it properly/portably/consistantly/etc..
:
: Any ideas?
use the delete() function from CGI, before you request the query
string.
delete('love');
delete('foo');
my $q = query_string();
If it isn't going to work for you to delete portions of the query
string you can do it using a CGI object.
use CGI qw[:standard];
my $cgi = CGI->new;
$cgi->delete('love');
$cgi->delete('foo');
my $q = $cgi->query_string();
Then elsewhere in your program you can use the original query string
paramters.
my $thing = param('foo');
Casey West
--
"The wireless music box has no imaginable commercial value. Who would
pay for a message sent to nobody in particular?"
-- David Sarnoff's associates in response to his urgings for
investment in the radio in the 1920s.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]