use strict; use warnings; my @array = 1 .. 10; doingStuffWith ($_) for @array; print "@array"; sub doingStuffWith { $_[0] +=10; }