in reply to Re: I've read perlref
in thread I've read perlref

yesyes, I understand the efficiency argument (copying data rather than pointing to it), but it certainly is not easier, or quicker to develop.

And yes, you can only pass one value from a subroutine, even if that value is a list of other values. Joy. Rather than being able to directly return a int, a list, a different list I have to stuff all that into onebig list and start playing with references all over again!

Why they want me to do this stuff in Perl and not Python I dont know....

Replies are listed 'Best First'.
Re: Re: Re: I've read perlref
by Corion (Patriarch) on Mar 11, 2004 at 12:04 UTC

    Did you ever try to return multiple values from a subroutine?

    sub multi { return 1,2,'a','b',3,4; }; print $_ for (multi);

    It's not as nice as Pythons way, where you can return multiple arrays without having to think about references, but it's certainly transparently possible.