in reply to Crafting a regex

Yes, I know that there is such a thing as Apache::ParseLog but since it's OO, I have efficiency worries
The overhead to call a method is about twice that of a normal subroutine call, if I recall "The Damian"'s benchmarks on it. You are optimizing a lot of stuff that could better be served by using a module. Please stop reinventing an inefficient wheel.

At a minimum, look inside the module source (it's free!) to see how they solved it.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: Re: Crafting a regex
by arturo (Vicar) on Oct 11, 2000 at 21:31 UTC

    Interesting suggestion. Poking around inside the innards of the module, I find

    my($url_rx) = '(\\S+)'; # %U (url, URL)

    Which isn't going to solve the problem; not that I would expect it to, actually. "the problem with making anything so foolproof is that fools are so (consarned) ingenious!"

    That's it, then, those lines are going on the junkheap =)

    Philosophy can be made out of anything -- or less