nysus has asked for the wisdom of the Perl Monks concerning the following question:
I think I must be missing something obvious because retrieving a value from a Tie::IxHash seems awfully convoluted:
my $hash = Tie::IxHash->new; $hash->Push('one' => 1, 'two' => 2); my @indices = $hash->Indices('two'); my @results = $hash->Values(@indices);
It seems like I should be able to do my $value = $hash->Values('two'); but the documentation doesn't mention that syntax.
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Retrieving a single value from a Tie::IxHash object (updated)
by haukex (Archbishop) on Oct 09, 2017 at 19:37 UTC | |
|
Re: Retrieving a single value from a Tie::IxHash object
by NetWallah (Canon) on Oct 09, 2017 at 19:17 UTC | |
by nysus (Parson) on Oct 09, 2017 at 20:56 UTC | |
by nysus (Parson) on Oct 09, 2017 at 20:51 UTC | |
|
Re: Retrieving a single value from a Tie::IxHash object
by nysus (Parson) on Oct 09, 2017 at 19:06 UTC | |
by nysus (Parson) on Oct 09, 2017 at 20:56 UTC | |
by Laurent_R (Canon) on Oct 09, 2017 at 19:56 UTC |