@TEMP = (); foreach $_ (@input) { push @TEMP, SOME_EXPRESSION; } @result = @TEMP;