Using foreach to change the value in an array
@a = (1 .. 10); foreach (@a) {$_ *= 2;} print join(", ", @a);