[Israel.pm] HASH with 3 key items

Gabor Szabo szabgab at gmail.com
Thu Jun 28 05:53:28 PDT 2007

On 6/28/07, Ernst, Yehuda <yernst at nds.com> wrote:
> Hello!
> I want to manage a list with 3 key items
> i want ( adders , name , title  = > phone)
> i need to check my list and  only if the 3 matches i need to extract the phone number
> can i do it with hash or i need something else?

I guess you have the information in some sort of file or database so
if you managed to extract the 4 pieces of information you can then write:

my %phonebook;
loop_over_file {
   $phonebook{$address}{$name}{$title} = $phone;

Gabor Szabo
Perl Training in Israel  http://www.pti.co.il/

More information about the Perl mailing list