in reply to Re: is the use of map in a void context deprecated ?
in thread is the use of map in a void context deprecated ?

...I seem to recall that map was just rewritten to check for void context and avoid the extra work if possible.

That is correct. And it's in Perl 5.8.1! From the 5.8.1. perldelta:

"map" in void context is no longer expensive. "map" is now context aware, and will not construct a list if called in void context.

Liz

  • Comment on Re: Re: is the use of map in a void context deprecated ?

Replies are listed 'Best First'.
Re: Re: Re: is the use of map in a void context deprecated ?
by arno (Scribe) on Oct 05, 2003 at 19:22 UTC
    I didn't know perldelta('s), we can learn a lot from it ...
    Let me sharing this :
    "Switch", by Damian Conway, has been added. Just by saying :
    use Switch;
    Fore more information on this module :
    $ perldoc Switch

    Thanks Liz and Zaxo for answering,

    Arnaud
      It's just a source filter though, and while it tries really hard to parse Perl, only perl really can. F.ex, I (only accidentally) discovered it was causing a spurious problem for someone else a while ago that seemed to be completely unrelated.

      Makeshifts last the longest.