in reply to Re: Variant of map for special-casing the last item
in thread Variant of map for special-casing the last item

The maplist solution looks really sweet. And it's obviously far more generic than mine. But I have a little problem with the fact that it makes an array (of subrefs) equal in size to the input list. This could be quite expensive. Maybe it should be able to take a "sparse array" (i.e. hash) as an alternative...

Where does that map_by_index come from?

What is the sound of Windows? Is it not the sound of a wall upon which people have smashed their heads... all the way through?

Replies are listed 'Best First'.
Re^3: Variant of map for special-casing the last item
by Anonymous Monk on Oct 25, 2010 at 19:24 UTC
    It doesn't actually exist :) but hopefully you see how/what it would do :)