@array = (10,20); Double(*array); sub Double { local *copy = shift; foreach my $element (@copy) { $element *=2; } }