in reply to Re: Re^6: Counting keys with defined or undefined elements in a hash (behaviour of values())
in thread Counting keys with defined or undefined elements in a hash

Glad to help. :) As for it throwing the created scalar away - well, each gets called in list context, but it can't know what list its return value is being assigned to.

Makeshifts last the longest.

  • Comment on Re^8: Counting keys with defined or undefined elements in a hash (behaviour of values())

Replies are listed 'Best First'.
Re: Re^8: Counting keys with defined or undefined elements in a hash (behaviour of values())
by Oberon (Monk) on Jun 13, 2003 at 18:52 UTC
    > ... but it can't know what list its return value is being assigned to.

    No, I suppose not. Well, not without a change to the language anyway ... I wonder if Perl 6 would be able to tell. Then again, perhaps such a detailed level of introspection isn't generally useful.