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


in reply to help with references

Thank you all for your input! Not only did i find the correct solution, but also got much needed clarification on the way structures work in Perl. So the solution i used, as described by @moritz, was to use the Clone mode. And that solved it!