Missing Something.

Mark Fowler mark at twoshortplanks.com
Mon Oct 1 16:32:38 BST 2007


On 1 Oct 2007, at 15:28, Clooney, David wrote:

>     $chester_userid = (param('chester_userid'));

and

>     if         ($crxfnp02_users =~ m/$chester_userid /i ) {

Please note that $chester_userid is being used as a regular  
expression, not a string here.  If a user enters something other than  
plain letters and numbers it's not going to do what they want.

See "How can I quote a variable to use in a regex?" in the Perl FAQ:   
http://faq.perl.org/perlfaq6.html#How_can_I_quote_a_va

Mark.


More information about the london.pm mailing list