I agree that what you propose is better, returning match[1] rather than $1.  As soon as you said 'global match variables' you had me convinced.