[EMAIL PROTECTED] (Randal L. Schwartz) writes:

> So is that something we've agreed, that lvalue subs are *always*
> scalars?  That'd mean we can move on to the various implementation
> details. :)

Err, I for one would like to see *any* data types lreturn-able.

If a subroutine can return a list, why not an array or hash?

        my (@names, @ranks, @others);
        sub select_container ($description) {
                switch ($description) {
                        case /name/i  { lreturn @names }
                        case /rank/i  { lreturn @ranks }
                        lreturn @others
                }
        }

        while (<>) {
                push select_container, $_;
        }


Damian

Reply via email to