my @array = (1,2,3); test (); sub test { print $array[0]; } #prints 1