in reply to Re: Array from Data Dump
in thread Array from Data Dump

foreach (keys %{$name->{nodes}}) { push @trap,$name->{'nodes'}->{$_}; }
Is returning a hash ref:
HASH(0x2138d1c) HASH(0x1fff6a8) HASH(0x1fff744) HASH(0x1fff7e0) HASH(0 +x1fff87c) HASH(0x214fc78) HASH(0x1ffd238) HASH(0x1fe336c) HASH(0x1ffd2d4) HASH(0x1ffd370) HASH(0 +x1ffd40c) HASH(0x215c52c)

Replies are listed 'Best First'.
Re^3: Array from Data Dump
by tall_man (Parson) on Mar 03, 2003 at 15:24 UTC
    Well, of course it does if you do something like this after the loop is done:
    print join(" ",@trap),"\n";
    You said you wanted to extract your nodes, and that's what you get -- hash references to the nodes stored in @trap. If you print them, you'll get stringified references. You can use Data::Dumper on them, or dereference them to process their fields, but just printing them won't work.

    Update: Did you just want the list of node names? Then do:

    my @trap = keys %{$name->{nodes}};
      That worked,
      Thanks