If you need help in this department, write a Perl::Critic rule that checks whether you make a copy as the first line of your map/grep/for/foreach/sub block. Your suggestion would mean slowing down almost any scalar assignment done.
In reply to Re^4: Changing array by changing $_?
by JavaFan
in thread Changing array by changing $_?
by johnvandam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |