in reply to sharing array please help

What's the purpose of $tmp variable? Where does meow sub end? Your code example is not complete.
Sorry if my advice was wrong.