in reply to Re^2: Passing three arrays to a subroutine
in thread Passing three arrays to a subroutine

Thanks for the quick responses. I found the problem - I entered @$my_ref_x in one place and $my_x_ref in the subroutine.

Sometimes it's hard to see the trees through the forest.

Thanks again.
  • Comment on Re^3: Passing three arrays to a subroutine

Replies are listed 'Best First'.
Re^4: Passing three arrays to a subroutine
by TomDLux (Vicar) on Nov 09, 2010 at 21:17 UTC

    One university computer lab used to have a teddy bear on a table next to the consultant's office. Before you could ask for help, you had to explain your problem to the teddy bear.

    It works without a consulting office, even without a university. Just explain your problem in detail to the teddy bear, or hat, or whatever you have around, and eventually, you'll say something like, "I don't understand why it stops working when i divide by zero."

    If a brief discussion with a shoe doesn't help, write a really, really, detailed message to perlmonks. Don't just cut-and-paste code, but discuss what it should do and what it actually does. If you don't figure out the problem along the way, you can actually submit it for outside assistance.

    As Occam said: Entia non sunt multiplicanda praeter necessitatem.

      TomDLux++

      This method has worked for me and my co-workers several times. It worked so good that we used the term "Oma-Problem" (granny problem) for it, "Ich brauche eine Oma" (I need a granny) became a common phrase when one of us needed a helper that listened while that one explained the problem in terms often simple enough for a granny.

      It works because it forces you to re-think the entire problem while explaining it. It works better if you have can make a co-worker listen to you.

      The method takes less time if the co-worker has some programming knowledge so that you don't have to explain programming basics. Ideally, (s)he can ask qualified questions about your problem. "Why do you ...", "are you sure that ...", and "what happens if ..." are really good questions.

      Talking to a secretary, the janitor or even your husband or your parents also works. It sometimes has the advantage that you have to explain really everything and in really simple terms, but it takes much more time. Still, it may be faster than classic debugging.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)