Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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.


Comment on Re: Ignore case of query string parameter
Download Code
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 surveying the Monastery: (13)
As of 2014-09-19 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (144 votes), past polls