Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by liz (Monsignor)
on Oct 05, 2003 at 18:57 UTC ( [id://296753]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://296753]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-24 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found