> Don't know if this helps, but the following code
>
> $one = "ExamPle";
> $two = "example";
>
> if ($one=~/$two/i) {
> print "true ";
> }
>
This is a bad idea for anything other than throwaway
scripts... it requires building a full regex everytime
(from $two). You *MUST* use quotemeta() on $two to make it
safe, other any regex characters will apply - which is VERY
UNSAFE.
Perl might be fast, but best not making it work harder than
is needed.
Unsafe, why?
------------
What if $two contained:
"((((.*)*)*)*)*a$"
that has exponential runtime :(
BUT, what if $two contained:
"?{system('rm -rf /')}"
that'd REALLY wreak your day - as you reach for the most
recent backup tapes...
Jonathan Paton
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]