my @x = qw /foo bar baz/; sub my_func {return @x}; (my_func) [1] .= "hello";