Greetings all,
Though Im not sure why you are manually altering your query string, I will leave that alone.
Here is something I was messing around with to hopefully get your desired functionality.
sub modify_query_str { #takes the parameter you wish to modify and the value you wish to set +it to. return $ENV{'QUERY_STRING'} unless(scalar @_ == 2); my ($key, $value) = @_; #Below is the substitution used in CGI::Util for the escape function. $value =~ s/([^a-zA-Z0-9_.-])/uc sprintf("%%%02x",ord($1))/eg; my %values = map{split /=/,$_;} split /&/, $ENV{'QUERY_STRING'}; $values{$key} = $value; return join("&", map{"$_=$values{$_}"}keys %values); }

Simply I know but is that what you are looking for?

-InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo

In reply to Re: Modifying Parameter Values w/CGI.pm by injunjoel
in thread Modifying Parameter Values w/CGI.pm by rtwingfield

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.