my @results = foreach (@data) { $_ = $_ * 13; # some command to add the element to the resulting list # kind of push(), but how to get the reference # to the resulting array? }