When you set/get a scalar from an array/hash, its value is copied:Not always:
use strict; use warnings; use 5.010; my @arr = (1, 2, 3); for (@arr) { $_ *= 2; } print "@arr\n"; --output:-- 2 4 6
In reply to Re: The behavior of array and hash OPs
by 7stud
in thread The behavior of array and hash OPs
by llancet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |