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 |