in reply to Pull an array from a hash... or somthing

You seem to be confusing arrays and array references. A reference is actually a scalar that holds an address of something. To get the thing that it addresses, you have to dereference it somehow.

In the data structure you have, this is a reference:

$hash_ref->{devices}->{device}

To get the array, wrap it in @{} like so:

my @array = @{ $hash_ref->{devices}->{device} }

Have a look at perlreftut, and maybe References quick reference,

Replies are listed 'Best First'.
Re^2: Pull an array from a hash... or somthing
by pez252 (Novice) on Feb 22, 2008 at 19:44 UTC
    You're right on the money. Being new to perl I caught on quickly that there was a difference between a reference to an array and the array its self, but I have yet to figure out how each is used in all the situations. That page spells it out nicely; I'll be bookmarking that post...

    Thanks!