Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Regex switching problem

by nardo (Friar)
on Oct 20, 2001 at 02:01 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2022-08-09 07:31 GMT
Find Nodes?
    Voting Booth?

    No recent polls found