in reply to Dereference Empty(!) Array

Since you're not telling us how you're calling ding, I'm not sure what to tell you. If I call ding without arguments, all of @foo, @bar and @jazz end up as empty arrays.

To make your question complete, can you tell us

  1. How you call ding
  2. What @foo and @bar end up to be, and what you expect @jazz to be?