2 effects are overlaying.
Since you reassign these elements with the map, you are effectively changing @_, it's like writing @_ = map { 2 * $_ } @_;
Change this to my @arr = map { 2 * $_ } @_; and your problem disappears
Style tips how to avoid this
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re: How come @_ gets changed here?
by LanX
in thread How come @_ gets changed here?
by pritesh_ugrankar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |