On Mon, Nov 03, 2003 at 05:06:01PM +0100, Elizabeth Mattijsen wrote: > At 14:06 +0000 11/3/03, Tim Bunce wrote: > >Its cheap to reset an iterator, just do > > keys %foo; > >before the C<each> loop. > > Just wondering, is keys() optimized for void context? Perlfunc only states: > > As a side effect, calling keys() resets the HASHâ¤s internal iterator... > > If it is _not_ optimized for void context, I think it's "easy" to > reset rather than "cheap" ;-) > > If keys() _is_ optimized for void context, a change in the > perlfunc.pod seems to be in order.
No idea. A change in the perlfunc.pod seems to be in order either way. Tim.