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;
In reply to Re: non aliased default var $_
by ikegami
in thread non aliased default var $_
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |