Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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?
[Discipulus]: ;=)
[choroba]: then learned some assebly on the same machine, then moved to my father's PC (XT with a Hercules card), used Turbo Pascal a lot
[choroba]: I started with *nix at the University, we had some Sparcs and Linux machines
[choroba]: that was around 1994 or 95
hippo actually introduced Linux to his university.
Discipulus mmh will be a fun meditation: How I started with computers and programming..
[Discipulus]: bravo hippo! well done

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2018-06-22 09:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (123 votes). Check out past polls.

    Notices?