in reply to (MeowChow) Re: Is this CGI search secure?
in thread Is this CGI search secure?

You might want to a look at this apachecon talk to see how you can safely use the /o modifier under mod_perl. Basically saying:

eval q{my @lines = grep /\Q$find/io, @$data_ref;}

would solve the /o modifier problem.

b.t.w. this talk addresses many other good points that come in handy when programming for mod_perl

Replies are listed 'Best First'.
(MeowChow) Re3: Is this CGI search secure?
by MeowChow (Vicar) on Jul 23, 2001 at 14:12 UTC
    You're better off using the qr operator rather than evaling run-time code for this sort of thing (I'm surprised this wasn't mentioned in the ApacheCon talk):
      
    my $re = qr/\Q$find/i; my @lines = grep /$re/, @$data_ref;
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print