Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: (MeowChow) Re: Is this CGI search secure?

by wine (Scribe)
on Jul 23, 2001 at 12:34 UTC ( [id://98935]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://98935]
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: (3)
As of 2024-04-20 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found