Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://173961]
LanX wished he could vote in Britain
LanX - A referendum on whether or not to have another Brexit referendum.
LanX - Legalise the hunting of fox hunters

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2017-06-23 18:13 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (553 votes). Check out past polls.