in reply to Re: Validating incoming CGI form data
in thread Validating incoming CGI form data
Note that both snippets will behave in probably undesired ways if any of the parameters have multiple values.while(my ($param, $rx) = each %laundry) { local $_ = $cgi->param($param) or die "Parameter $param not present\n"; ($laundered_params{$param}) = /$rx/; or die "Invalid input for $param\n"; }
Makeshifts last the longest.
|
|---|