in reply to Re: Re: foreach (each character in string..)?
in thread foreach (each character in string..)?
You can avoid the $& penalty by using parentheses: /(.)/gs and using the $1 variable.
Just to clarify ... you can avoid the $& penalty on all your other regular expressions, but you still pay it on this one (only its name is changed to $1)
|
|---|