my @anon_list; for (@a) { push @anon_list, foo(); } @b = @anon_list;