in reply to Re: here is a script to log what you do during the day...
in thread here is a script to log what you do during the day...

Why use map in void context and create a list that you are not going to use?

No list is built in void context anymore.

The only thing that got created and not used is the SVs created by post-increment. $x++ automatically gets converted to ++$x in void context, so your for rewrite doesn't suffer from this whereas the original did.

  • Comment on Re^2: here is a script to log what you do during the day...

Replies are listed 'Best First'.
Re^3: here is a script to log what you do during the day...
by jwkrahn (Abbot) on Feb 07, 2011 at 22:34 UTC
    No list is built in void context anymore.

    Ah yes ... gianni didn't say which version of Perl was used so you can't assume that.    :-)

      I don't know what you think I said, but I didn't make any assumptions. I even verified that the passage you quoted was true* before posting it.

      * — The body of the map still creates a list (of one value in this case), but the list that map would return is not created.