From: Tad McClellan on
John Bokma <john(a)castleamber.com> wrote:

> I thought you gave classes at Stonehenge


I do.


> but just read that you only
> sell them.


Where did you read that? It is in error.


> Figures.


Ran out of other approaches, so resorting to ad hominem now eh?

That's sure to be convincing...


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
From: John Bokma on
Tad McClellan <tadmc(a)seesig.invalid> writes:

> Ran out of other approaches,

To be honest, I knew from the start it would be pointless to discuss
things with asshats like you and Uri. So, good luck with your Perl
"community". I am sure the newbies will find greener pastures at Stack
Overflow or elsewhere.

--
John Bokma j3b

Hacking & Hiking in Mexico - http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development
From: Tad McClellan on
John Bokma <john(a)castleamber.com> wrote:
> Tad McClellan <tadmc(a)seesig.invalid> writes:
>
>> Ran out of other approaches,
>
> To be honest, I knew from the start it would be pointless to discuss
> things with asshats like you


You have slandered me in public when you said in your ad hominem attack:

but just read that you only sell them.

Are you willing to stand behind what you have written?

Man up and tell me where you read that (if you don't, then we'll
just assume that you made it up).


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
From: Ben Morrow on

Quoth Tad McClellan <tadmc(a)seesig.invalid>:
> John Bokma <john(a)castleamber.com> wrote:

Both of you, please take this elsewhere.

Ben

From: sln on
On Sun, 13 Jun 2010 07:41:06 -0700 (PDT), Peng Yu <pengyu.ut(a)gmail.com> wrote:

>If I only have a small number of patterns(say 3), I can just spell out
>the matching code as below.
>
>grep {/$pattern1$/ or /$pattern2$/ or /$pattern3$/} @array;
>
>But if I have @patterns with many patterns that I want grep, the above
>way doesn't work. I'm wondering what is the best way to grep many
>patterns.

Late to the thread, you have some good potential solutions by now.

I just want to make a correction to your statement.
If you have @patterns, it is indeed possible to spell it out and it
does work:

grep {/$pattern[1]$/ or /$pattern[2]$/ or /$pattern[3]$/} @array;

I don't buy into the propaganda that @patterns are usefull.
Here's why.

When you split up a real regular expression, those with quantifiers,
groups, and modifiers, the potential for disaster increases exponentially.
Throwing them into "strings" to be dynamically compiled is another problem.
Then there's that dynamic string problem.

The faq's give the simplest of simple examples and are not real world.
Multi-part regular expressions are fraught with danger in the hands of the novice
(hell, even the experts).

So, be sure to put this note in the book you are having everybody write for you.
Sorry, no code examples, check the faq.

-sln