<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=639143202-21112008><FONT face=Arial size=2>Hi 
All,</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008><FONT face=Arial size=2>&nbsp;Can anybody 
give me an idea of just how much impact using $&amp; can have on a 
program?</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008><FONT face=Arial size=2>I have a function 
which does something like this:</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=639143202-21112008><FONT face=Arial size=2>foreach my 
$this_line(@an_array)</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008><FONT face=Arial 
size=2>{</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008>&nbsp;&nbsp;&nbsp; <FONT face=Arial 
size=2>next if ($this_line=~m/something which indicates we're not 
interested/);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008>&nbsp;&nbsp;&nbsp; <FONT face=Arial 
size=2>if ($this_line =~m/something we are interested in 
\d*\.*\d*)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008>&nbsp;&nbsp;&nbsp; <FONT face=Arial 
size=2>{</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT face=Arial size=2>my $foo=$&amp;;</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT face=Arial size=2># Do some stuff with $foo</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008>&nbsp;&nbsp;&nbsp; <FONT face=Arial 
size=2>}</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008>&nbsp;&nbsp;&nbsp; <FONT face=Arial 
size=2>elsif ($this_line=~m/something else interesting 
\d*\.*\d*/)</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008>&nbsp;&nbsp;&nbsp; <FONT face=Arial 
size=2>{</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my 
$bar=$&amp;;</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT face=Arial size=2># Do something with $bar</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008>&nbsp;&nbsp;&nbsp; <FONT face=Arial 
size=2>}</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008><FONT face=Arial 
size=2>}</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=639143202-21112008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=639143202-21112008><FONT face=Arial size=2>@an_array could be 
anything up to about 50 elements.</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=639143202-21112008><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 class=639143202-21112008><FONT face=Arial size=2>I just don't know if 
it's going to be worth removing those references to $&amp;, and how much it will 
benefit the running of the program.</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008><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 class=639143202-21112008><FONT face=Arial size=2>So, are we talking 
an order of magnitude slower? More? Less? Anybody even want to take an 
educated&nbsp;guess?</FONT></SPAN></DIV>
<DIV><SPAN class=639143202-21112008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV align=left>
<DIV align=left><FONT face=Arial 
size=2>Regards,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Leigh</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Leigh Sharpe<BR>Network Systems Engineer<BR>Pacific 
Wireless<BR>Ph +61 3 9584 8966<BR>Mob 0408 009 502</FONT></DIV>
<DIV><FONT face=Arial size=2>Helpdesk 1300 300 616<BR>email <A 
title=mailto:lsharpe@pacificwireless.com.au 
href="blocked::mailto:lsharpe@pacificwireless.com.au">lsharpe@pacificwireless.com.au</A><BR>web 
<A title=http://www.pacificwireless.com.au/ 
href="blocked::http://www.pacificwireless.com.au/">www.pacificwireless.com.au</A></FONT></DIV></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>