http://www.perlmonks.org?node_id=1026280


in reply to adding items, but with interim results

That's fairly trivial and can be done using map. I don't want to spoil you a joy of discovery, so not giving the answer.