my @result; for my $thing(qw(a b c d)) { # complex code block that munges $thing followed by push @result, $thing; }