Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Regex switching problem

by nardo (Friar)
on Oct 20, 2001 at 02:01 UTC ( [id://120166]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://120166]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-26 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found