in reply to get one value from Tie::IxHash
You forgot the 's' in the Values method. Also note that by default is returns an array, but it can return a scalar if desired
use strict; use warnings; my $r = new Tie::IxHash(); $r->Push('a' => 1); print "The key a in my hash has value ", $r->Values('a'), "\n";
I've run this code and the output is exactly what you expect.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: get one value from Tie::IxHash
by jeanluca (Deacon) on Dec 14, 2009 at 16:34 UTC | |
by Anonymous Monk on Dec 14, 2009 at 16:51 UTC | |
|