how good is: http://search.cpan.org/~zenin/CGI-Validate-2.000/Validate.pm which is the best module for validating form data? can i have some pointers to some good examples please?
From: Rajeev Prasad <[email protected]> To: Cc: Perl Beginners <[email protected]> Sent: Wednesday, September 7, 2011 11:34 AM Subject: Re: form POST string parser Uri, thx. I like that suggestion, i totally missed that earlier. I will explore cgi module. From: Uri Guttman <[email protected]> To: Rajeev Prasad <[email protected]> Cc: Perl Beginners <[email protected]> Sent: Tuesday, September 6, 2011 7:24 PM Subject: Re: form POST string parser >>>>> "RP" == Rajeev Prasad <[email protected]> writes: RP> hi, RP> RP> which of the two is better? thx. RP> RP> $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; RP> RP> or RP> $value =~ s/%(..)/chr(hex($1))/ge; both are bad because parsing your own http data is a bad thing. it has little gotchas all over. use one of the several modules (CGI.pm and others) that do this for you. they do it correctly and cover all the little corner cases. uri -- Uri Guttman -- uri AT perlhunter DOT com --- http://www.perlhunter.com -- ------------ Perl Developer Recruiting and Placement Services ------------- ----- Perl Code Review, Architecture, Development, Training, Support ------- -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
