$& discussion

Doug Miles doug.miles at
Wed Aug 23 13:26:55 CDT 2000

I looked into the $& problem in O'reilly's "Mastering Regular
Expressions", and found that the inefficiency is caused by perl making a
copy of the string that is being matched against.  This is also caused
by using '()'s in a regex (which I am doing), so avoiding the use of $&
won't help.  Also, with the addition of \s* to my pattern (which I have
done), I don't think I can avoid using $&.  Great discussion!

- Doug

Don't anthropomorphize computers. They hate that.

More information about the Phoenix-pm mailing list