my $arref = test(); sub test{ my @array = (1..10); return \@array; }