> the life of me, I cannot get there. I have tried... > > foreach $key ( keys %$hostsref ) { > print ("Inserting $key into Database\n");
Try this, the prints are to make it easier to understand, hopefully :-) # print '$hostsref = ' . $hostsref . "\n"; # your original hash ref # print '%$hostsref = ' . %$hostsref . "\n"; # derefed to a hash # print '$$hostsref{$key} = ' . $$hostsref{$key} . "\n"; # the array ref from a hash key-value pair # print '@{$$hostsref{$key}} = ' . @{$$hostsref{$key}} . "\n"; # the derefed array hence you want... (u woz so close) @arr = @{$$hostsref{$key}}; > @arr = @{ $hostsref{$key} }; > print ("[EMAIL PROTECTED]"); > ($dnsName, $comm, $sysoid, $pollint, $pollYN) = @arr; > print ("\t$dnsName, $comm, $sysoid, $pollint,$pollYN\n"); > } HTH Rob Anderson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]