in reply to Re: quick question about hash element access
in thread quick question about hash element access
my %test_hash; $test_hash{'a'}{'b'}{'c'}{'d'} = "Yay"; print get_id(\%test_hash, "a.b.c.d"), "\n"; sub get_id { my $thingy = shift; my @keys = split /\./, shift; foreach my $key ( @keys ) { $thingy = $$thingy{$key}; } return $thingy; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: quick question about hash element access
by Nkuvu (Priest) on Jun 27, 2003 at 21:45 UTC | |
by LanceDeeply (Chaplain) on Jun 27, 2003 at 22:32 UTC | |
by argggh (Monk) on Jun 28, 2003 at 14:06 UTC |