jfroebe has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have an array that holds multiple hashes... looking for a way to
easily
example:
$sysmon_data[0]->{metadata_cache_mgmt}{max_open_databases}{count} $sysmon_data[0]->{cache_mgmt}{spinlock_contention}{per_sec}
What I would like to do is to make an anonymous array to
easily access the lowest hash while avoiding a for/while
loop if possible (I'm dealing with several hundred 'lowest
hashes' - with possibly hundreds of array instances).
something like so (pseudo code):
basically I need an anonymous array of the "{per_sec}" in this instance.$($sysmon_data->{cache_mgmt}{spinlock_contention})[0]->{per_sec}
Edit: BazB fix code tags/reformat
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: accessing an array with multiple hashes
by diotalevi (Canon) on Nov 11, 2003 at 20:49 UTC | |
|
Re: accessing an array with multiple hashes
by ysth (Canon) on Nov 11, 2003 at 23:06 UTC | |
|
Re: accessing an array with multiple hashes
by ptkdb (Monk) on Nov 11, 2003 at 20:53 UTC | |
by jfroebe (Parson) on Nov 11, 2003 at 21:04 UTC | |
|
Re: accessing an array with multiple hashes
by Roger (Parson) on Nov 11, 2003 at 20:24 UTC | |
by diotalevi (Canon) on Nov 11, 2003 at 20:30 UTC |