in reply to using local and pass by reference method
Always use my. Never use local.
The reasons are given by Dominus in Coping with Scoping.