sub foo { my @x = qw(a b c); return \@x } my $f = foo();