in reply to Regex switching problem
Do you understand what the /o regex modifier does? The line:
$i =~ s/$i/ tools.description LIKE "\%$i%"/o;
This will compile the regex only once so whatever the first $i is becomes what is used for all subsequent matches, I don't think you mean to use /o. It's also a bit silly to use $i =~ /$i/ logic.
$i =~ s/$i/ tools.description LIKE "\%$i%"/o;
This will compile the regex only once so whatever the first $i is becomes what is used for all subsequent matches, I don't think you mean to use /o. It's also a bit silly to use $i =~ /$i/ logic.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Regex switching problem
by cfreak (Chaplain) on Oct 20, 2001 at 02:10 UTC |
In Section
Seekers of Perl Wisdom