Your map is returning the wrong value, and its clobbering its arguments by changing $_.
List::MoreUtils's apply and Algorithm::Loops's Filter have the interface you are expecting from map.
In reply to Re: Global array afftected by map inside of a subroutine
by ikegami
in thread Global array afftected by map inside of a subroutine
by Lady_Aleena
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |