Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: Re: Common Regex Gotchas

by chipmunk (Parson)
on May 09, 2001 at 00:30 UTC ( #78944=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Common Regex Gotchas
in thread Common Regex Gotchas

Happily, that doesn't appear to be the case. I don't see any occurence of the $& et al. variables in the code for Benchmark.pm

The real problem here is the use of /e on the substitution, when this would work just as well and be much more efficient: s/(\w+)/\U$1/g;

Replies are listed 'Best First'.
Re: Re: Re: Re: Common Regex Gotchas
by dws (Chancellor) on May 09, 2001 at 00:32 UTC
    I don't see any occurence of the $& et al. variables in the code for Benchmark.pm

    I think what our Anonymous friend means is that if one of the routines being benchmarked uses $&, then all routines suffer (unfairly) from the overhead.

      I'm pretty sure that the AM was referring to the module itself, especially since none of the code in this thread actually uses $& et al.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://78944]
help
Chatterbox?
[holli]: yeah, then vroom will personally stab me in the back at night
[holli]: exactly, moritz
[moritz]: with a big table of redirects to support the old links
[LanX]: do it
[holli]: well if you put some cleverness into the migration you can auto convert most of the links as well
[LanX]: Let's Make PerlMonks Great Again!
[holli]: but you know what? i don't think i'd fancy that. I like PM as it is.
[holli]: Alone the chatterbox and everybody writes his own cb client tradition
[LanX]: there was a guy who tried to steal the concept and build an own monastery ...
[LanX]: yeah PM is very emacsy ;-)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2017-11-20 19:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (292 votes). Check out past polls.

    Notices?