Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: form parsing

by merlyn (Sage)
on Oct 09, 2001 at 19:07 UTC ( [id://117757]=note: print w/replies, xml ) Need Help??


in reply to Re: form parsing
in thread form parsing

my %input = map { $_->$cgi->param($_) } $cgi->param();
can be written as:
my %input = map { $_ => scalar $cgi->param($_) } $cgi->param();
to fix the possible "multiple value" problem, for some version of "fix". (Your arrow was wrong, by the way.)
foreach my $key (keys %input) { $input{$key} =~ tr/*//d; # or whatever makes sense }
can be written as:
tr/*//d for values %input;
for recent versions of Perl.

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-24 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found