in reply to using / accessing nested hash/array references

Can't use string ("14") as a SCALAR ref ...

You're getting the error because $hostresults[0] apparently evaluates to 14 (what get_list() returns in scalar context), which you then try to dereference as a scalar by putting ${} around it.

It's not really clear to me what you want to be printed in line 28, so it's difficult to advise how to achieve it.  In case you want to print some complex data structure, I'd recommend Data::Dumper  (e.g. print "RESULTS = ", Dumper(\@results); ).

Replies are listed 'Best First'.
Re^2: using / accessing nested hash/array references
by tspfwj (Initiate) on Jan 20, 2011 at 14:17 UTC
    Thank you for the reply but the output was there only to provide output to show people the nature of the data I was working with. This and the other responses allowed me to recognize why I'm seeing the scalar value of the array. I am still wondering if or how I could manage this though and that is what I am still fighting. I want to take what is returned by the subroutine, a list of hashes, and I want to place that into a list. The goal being that the list of hashes for box1 is in index0, list of hashes for box2 is in index1, and so on.