in reply to •Re: Passing an array between multiple modules?
in thread Passing an array between multiple modules?

Well, there are actions being performed on the array as it passes through each module. Basically, I just need to figure out how to pass it around.

And it probably is a bad design, but it's what I have to work with right now.
  • Comment on Re^2: Passing an array between multiple modules?

Replies are listed 'Best First'.
Re^3: Passing an array between multiple modules?
by tilly (Archbishop) on Sep 30, 2004 at 15:05 UTC
    s/probably is/definitely is/

    In 3 different modules you have 3 things named @stats. They are different. That means that no matter how you're thinking about your code, at least two of them have confusing names. For more detail, see the advice on variable naming in Code Complete II.

    To answer your original question, there are three likely confusions that I can see. One is that you're trying to call functions in another module without calling use or require first. The second is that you've written the module but didn't use the package command to make the module name match the names of its functions. The third is that you've somewhere built up a data structure in a function but forgot to return it.

    Still think about merlyn's design comment. Even if you don't know how to avoid a bad design right now, understanding what he reacted to will help you learn.