Thank you! Now it makes perfect sense. I am actually in the habit of using
foreach my $variable (@array) { doingStuffWith($variable); }
I guess that also prevents the elements from being changed. Thanks again for showing me the perl 'magic'.
20081016 Janitored by Corion: Closed code tag, as per Writeup Formatting Tips
In reply to Re^2: Changing array by changing $_?
by johnvandam
in thread Changing array by changing $_?
by johnvandam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |