<div><div>From perlre:</div><div><br></div><div><div>WARNING: Once Perl sees that you need one of $&, $', or $' anywhere in</div><div> the program, it has to provide them for every pattern match. This may</div><div>
substantially slow your program.</div><div><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>
<div><span><font face="Arial" size="2">This is the only
place in the whole program which uses a regex, so the impact on other parts of
the program should be nil.</font></span></div>
<div><span><font face="Arial" size="2">I just don't know if
it's going to be worth removing those references to $&, and how much it will
benefit the running of the program.</font></span></div>
<div><span><font face="Arial" size="2">Obviously, the
bigger @an_array is, the larger the impact, but I can safely say it won't be
much bigger than about 50.</font></span></div>
<div><span><font face="Arial" size="2">So, are we talking
an order of magnitude slower? More? Less? Anybody even want to take an
educated guess?</font></span></div></div></blockquote><div><br></div><div><div><div>In other words, having it only in the above code will still impact *all other* regexes in any code, including all imported modules.</div>
<div><br></div><div>Alfie</div></div></div></div></div>