in reply to Acessing an array element in a hash
my %key_hash= %{$VAR1}; $key = 'response_1.3.6.1.2.1.2.2.1.12.27'; $oid = '1.3.6.1.2.1.2.2.1.12.27';
Possible Error Detection:print $key_hash{$key}{$oid}[0]->[1];
dereference it and prints the entire array. Above suggested code just prints '1' as the 2nd element of that dereferenced array'.print "@{$key_hash{$key}{$oid}[0]}\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Acessing an array element in a hash
by Anonymous Monk on Mar 26, 2003 at 15:38 UTC |