in reply to mying arrays?

In addition you dont have to do the assigning,  my (@array, %hash, $scalar); works quite well.

Using my you're scoping your variables.