in reply to Re: •Re: subroutines and returning lists...
in thread subroutines and returning lists...

Your problem is that you try to return multiple times (every loop through the first foreach). This means that you end up returning an array with only one element. Put the return statement just before the end of the sub (after the foreach).

Added clarification.

  • Comment on Re: Re: •Re: subroutines and returning lists...

Replies are listed 'Best First'.
Re: Re: Re: •Re: subroutines and returning lists...
by ATB (Initiate) on Apr 04, 2003 at 15:15 UTC
    Mad Hatter et al.,

    Thank you very much for your help. Of course it had to be something utterly trivial like having return inside of a loop. doh!