Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Ignore case of query string parameter

by c-era (Curate)
on Jun 12, 2002 at 18:59 UTC ( #173961=note: print w/ replies, xml ) Need Help??


in reply to Ignore case of query string parameter

I haven't tested this code, but it should work ;)
my %params; for my $paramName ($query->param){ $params{lc($paramName)} = $query->param($paramName); }
All of your params should be in the %params hash, and you just use the lc version of your param name to access your value.

Replies are listed 'Best First'.
Re: Re: Ignore case of query string parameter
by Weasel (Sexton) on Jun 12, 2002 at 20:13 UTC
    same untested code but written into one line :)
    my %params = map {(lc($_)=>$query->param($_))} $query->param;
    (personally I tend to write similar code this way)

    Best wishes
    Weasel

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2016-06-30 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (389 votes). Check out past polls.