Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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]
[stevieb]: I inhereted C#, so I had to become familiar with it pretty quickly. I am considering taking a crack at re-writing berrybrew in C++
[stevieb]: I haven't yet done the reserach needed to see if it's possible though

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2017-02-20 21:22 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (303 votes). Check out past polls.