On Tue, Nov 04, 2003 at 07:18:34AM +0530, Abhijit Menon-Sen <[EMAIL PROTECTED]> wrote:
> At 2003-11-03 21:35:22 +0000, [EMAIL PROTECTED] wrote:
> >
> > > Just wondering, is keys() optimized for void context?
>
> Yes. From doop.c:Perl_do_kv:
>
> OP *
> Perl_do_kv(pTHX)
> { ...
>
> keys = hv;
> (void)hv_iterinit(keys); /* always reset iterator regardless */
>
> if (gimme == G_VOID)
> RETURN;But be aware that it is also optimized for scalar context only if the hash isn't tied.
