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.

Replies are listed 'Best First'.
Re: Re: Regex switching problem
by cfreak (Chaplain) on Oct 20, 2001 at 02:10 UTC
    Ahhh of course... I think its lack of sleep or something. One of my co workers pointed out that there was really no reason to switch the whole string... duh okay code perl after more sleep next time :)

    Thanks everyone