sub a_sub { my @array = qw /a b c d e f g/; $ref = \@array; } a_sub(); print "$ref - @$ref - @array";