in reply to Pass an array reference or array indices to a subroutine?

Thank you all for your valuable comments and suggestions. I am beginning to gain some clarity on this topic!
UPDATE
I took a deeper look at the Profiler output and the culprit in the Method2 is in fact due to a totally different reason. I was defining the global array inside a while loop instead of defining it outside!
  • Comment on Re: Pass an array reference or array indices to a subroutine?