in reply to non aliased default var $_

That won't work. How would map know to use $__ instead of the normal result. You'd need a different function. Two such functions already exist: List::MoreUtils's apply and Algorithm::Loops's Filter.

use List::MoreUtils qw( apply ); my @bla = apply { tr/h//d } @arr; use Algorithm::Loops qw( Filter ); my @bla = Filter { tr/h//d } @arr;

Replies are listed 'Best First'.
Re^2: non aliased default var $_
by LanX (Saint) on Mar 10, 2010 at 16:06 UTC
    yeah I already realized that $__ wouldn't help a lot ...

    > Two such functions already exist...

    Thx! :)

    Cheers Rolf

    PS: but I have to admit that the documentation for Algorithm::Loops is too complicated for me...