You don't want to be using '$&' in your regex because "..once Perl sees that you need one of $`, $&, or $' anywhere in the program, it provides them for every pattern match. This will slow down your program a bit..." -- Programming Perl
See also:Why does using $&, $`, or $' slow my program down?
Just my 2 kobo advice.
In reply to Re: How does one get all possible matches from regex?
by 2teez
in thread How does one get all possible matches from regex?
by supriyoch_2008
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |