in reply to Re^2: need help with Tie::Judy
in thread need help with Tie::Judy
try this
A hash represents a set of key/value pairs:use Tie::Judy; tie %fruit_color, 'Tie::Judy';You can use whitespace and the '=>' operator to lay them out more nicely:my %fruit_color = ("apple", "red", "banana", "yellow");To get at hash elements:my %fruit_color = ( apple => "red", banana => "yellow", );You can get at lists of keys and values with keys() and values().$fruit_color{"apple"}; # gives "red"my @fruits = keys %fruit_color; my @colors = values %fruit_color;
see also Re: need help with Tie::Judy
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: need help with Tie::Judy
by Bod (Parson) on Dec 06, 2020 at 01:02 UTC | |
by LanX (Saint) on Dec 06, 2020 at 02:00 UTC |