for (@a) { my $b = $_; # Or do a deep copy, if necessary $b *= 2; }