In this case $_nodes is a hash reference that contains references to hashes, so I am returning a ref. Anyway, I'll change the code and use $_nodes->{name} instead of creating a temp hash %nodes.