in reply to Re: Re: Want a Hashref. Getting a List in Scalar Context.
in thread Want a Hashref. Getting a List in Scalar Context.

All things being equal, it's good to avoid return; it's an extra opcode that does nothing when it's at the end of the function.

On the other hand it's executed instead of the leavesub op, so its just as efficient.

  • Comment on Re: Re: Re: Want a Hashref. Getting a List in Scalar Context.

Replies are listed 'Best First'.
Re: Re: Re: Re: Want a Hashref. Getting a List in Scalar Context.
by chip (Curate) on May 04, 2004 at 23:04 UTC
    So it does; I never noticed that before.

    I guess we're back to the "less typing good" vs. "more redundancy good" argument, already in progress.

        -- Chip Salzenberg, Free-Floating Agent of Chaos