my @array = ( 1, 2, 3 ); my $aref = \@array; # assign a new value to $b[0] through the reference $aref->[0] = 99; # print the array for my $elem ( @array ){ say $elem; }